diff options
author | 2009-01-10 17:31:21 -0500 | |
---|---|---|
committer | 2009-01-10 17:31:21 -0500 | |
commit | ac698c5ea71d26e56289a18e664c6f8be1aa56c5 (patch) | |
tree | e683366e29ff29e8c0ebff54731ff505c201a6ff /modules/textadept/bookmarks.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 'modules/textadept/bookmarks.lua')
-rw-r--r-- | modules/textadept/bookmarks.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua index 8bcd3e7d..80853c29 100644 --- a/modules/textadept/bookmarks.lua +++ b/modules/textadept/bookmarks.lua @@ -1,5 +1,7 @@ -- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE. +local textadept = _G.textadept + --- -- Bookmarks for the textadept module. -- There are several option variables used: @@ -48,6 +50,7 @@ end --- -- Goes to the next bookmark in the current buffer. function goto_next() + local buffer = buffer local current_line = buffer:line_from_position(buffer.current_pos) local line = buffer:marker_next(current_line + 1, 1) if line >= 0 then _m.textadept.editing.goto_line(line + 1) end @@ -56,6 +59,7 @@ end --- -- Goes to the previous bookmark in the current buffer. function goto_prev() + local buffer = buffer local current_line = buffer:line_from_position(buffer.current_pos) local line = buffer:marker_previous(current_line - 1, 1) if line >= 0 then _m.textadept.editing.goto_line(line + 1) end |