diff options
author | 2009-01-10 17:31:21 -0500 | |
---|---|---|
committer | 2009-01-10 17:31:21 -0500 | |
commit | ac698c5ea71d26e56289a18e664c6f8be1aa56c5 (patch) | |
tree | e683366e29ff29e8c0ebff54731ff505c201a6ff /core/ext/pm/buffer_browser.lua | |
parent | 0194a626fcb17bcb037341fc6c2f586f54d26035 (diff) | |
download | textadept-ac698c5ea71d26e56289a18e664c6f8be1aa56c5.tar.gz textadept-ac698c5ea71d26e56289a18e664c6f8be1aa56c5.zip |
Various improvements to speed and readability of Lua code.
Added 'local textadept = _G.textadept' to all Lua modules, themes, etc.
Added more locals to core/ext/keys.lua for speed improvement.
Reformatted some Lua modules to the earlier standard committed.
Diffstat (limited to 'core/ext/pm/buffer_browser.lua')
-rw-r--r-- | core/ext/pm/buffer_browser.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/ext/pm/buffer_browser.lua b/core/ext/pm/buffer_browser.lua index 73b09d55..83bb26f9 100644 --- a/core/ext/pm/buffer_browser.lua +++ b/core/ext/pm/buffer_browser.lua @@ -1,5 +1,7 @@ -- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE. +local textadept = _G.textadept + --- -- Buffer browser for the Textadept project manager. -- It is enabled with the prefix 'buffers' in the project manager entry field. @@ -62,12 +64,11 @@ function perform_menu_action(menu_item, menu_id, selected_item) textadept.pm.activate() end -local add_handler = textadept.events.add_handler local function update_view() if matches(textadept.pm.entry_text) then textadept.pm.activate() end end -add_handler('file_opened', update_view) -add_handler('buffer_new', update_view) -add_handler('buffer_deleted', update_view) -add_handler('save_point_reached', update_view) -add_handler('save_point_left', update_view) +textadept.events.add_handler('file_opened', update_view) +textadept.events.add_handler('buffer_new', update_view) +textadept.events.add_handler('buffer_deleted', update_view) +textadept.events.add_handler('save_point_reached', update_view) +textadept.events.add_handler('save_point_left', update_view) |