diff options
author | 2011-12-31 16:39:25 -0500 | |
---|---|---|
committer | 2011-12-31 16:39:25 -0500 | |
commit | ae8dddf78ef5b07f4d64471d8f6800746373af6e (patch) | |
tree | 7c823a6df24dbec739559953e1c5d044067e226b /core/gui.lua | |
parent | d9b2bf4b99d13e18f0ca4939e7f2ccc75472a846 (diff) | |
download | textadept-ae8dddf78ef5b07f4d64471d8f6800746373af6e.tar.gz textadept-ae8dddf78ef5b07f4d64471d8f6800746373af6e.zip |
Code cleanup.
Diffstat (limited to 'core/gui.lua')
-rw-r--r-- | core/gui.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/gui.lua b/core/gui.lua index e8159b59..c4461561 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -276,7 +276,6 @@ connect(events.BUFFER_NEW, function() local ok, err = pcall(set_properties) if not ok then io.stderr:write(err) end end) -connect(events.BUFFER_NEW, function() events.emit(events.UPDATE_UI) end) -- Sets the title of the Textadept window to the buffer's filename. -- @param buffer The global buffer. @@ -312,8 +311,9 @@ connect(events.URI_DROPPED, function(utf8_uris) end end end) -connect(events.APPLEEVENT_ODOC, - function(uri) return events.emit(events.URI_DROPPED, 'file://'..uri) end) +connect(events.APPLEEVENT_ODOC, function(uri) + return events.emit(events.URI_DROPPED, 'file://'..uri) +end) local string_format = string.format local EOLs = { L('CRLF'), L('CR'), L('LF') } @@ -339,6 +339,8 @@ connect(events.MARGIN_CLICK, function(margin, pos, modifiers) if margin == 2 then buffer:toggle_fold(buffer:line_from_position(pos)) end end) +-- Updates the statusbar and titlebar for a new Scintilla document. +connect(events.BUFFER_NEW, function() events.emit(events.UPDATE_UI) end) connect(events.BUFFER_NEW, function() set_title(buffer) end) -- Save buffer properties. |