aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/bookmarks.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-04-29 16:13:59 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-04-29 16:13:59 -0400
commit78990df4f114c45adc7fd2678ffaedf0c4124d95 (patch)
tree9e79e8f93aa07ee9384b5ddd8cc548dc3c8ea20f /modules/textadept/bookmarks.lua
parent8407377bbe3800dbc4706f584285b7a7858efabc (diff)
downloadtextadept-78990df4f114c45adc7fd2678ffaedf0c4124d95.tar.gz
textadept-78990df4f114c45adc7fd2678ffaedf0c4124d95.zip
More code cleanup.
"local buffer = buffer" and similar optimizations are not needed since lexing the buffer is much more expensive and reaction time is limited by how fast the keyboard can submit key presses.
Diffstat (limited to 'modules/textadept/bookmarks.lua')
-rw-r--r--modules/textadept/bookmarks.lua2
1 files changed, 0 insertions, 2 deletions
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua
index 449626d7..3f383a56 100644
--- a/modules/textadept/bookmarks.lua
+++ b/modules/textadept/bookmarks.lua
@@ -20,7 +20,6 @@ local MARK_BOOKMARK = _SCINTILLA.next_marker_number()
-- current line. The default value is `nil`, toggling a bookmark.
-- @name toggle
function M.toggle(on)
- local buffer = buffer
local line = buffer:line_from_position(buffer.current_pos)
local f = on and buffer.marker_add or buffer.marker_delete
if on == nil then -- toggle
@@ -45,7 +44,6 @@ end
-- @param start `0` when going to the next mark, `buffer.line_count` when going
-- to the previous mark.
local function goto_mark(f, increment, wrap_start)
- local buffer = buffer
local current_line = buffer:line_from_position(buffer.current_pos)
local line = f(buffer, current_line + increment, 2^MARK_BOOKMARK)
if line == -1 then line = f(buffer, wrap_start, 2^MARK_BOOKMARK) end