aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-06-25 15:46:22 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-06-25 15:46:22 -0400
commit26f4d7930a68a7b14910fb6aed83f7db44bcf0e7 (patch)
tree080d35c1b04af0b3796a8d14b42dfc1d58624ad9 /modules/textadept
parent8204123d1f799ae4ffdc378ce1f53537351f7e5f (diff)
downloadtextadept-26f4d7930a68a7b14910fb6aed83f7db44bcf0e7.tar.gz
textadept-26f4d7930a68a7b14910fb6aed83f7db44bcf0e7.zip
Small code and documentation cleanup.
Diffstat (limited to 'modules/textadept')
-rw-r--r--modules/textadept/find.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 6b4efeee..30f9d0e3 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -200,6 +200,8 @@ local function find(text, next, flags, no_wrap, wrapped)
end
events.connect(events.FIND, find)
+local incremental_start
+
-- Finds and selects text incrementally in the current buffer from a starting
-- position.
-- Flags other than `FIND_MATCHCASE` are ignored.
@@ -209,10 +211,10 @@ events.connect(events.FIND, find)
-- position.
local function find_incremental(text, next, anchor)
if anchor then
- M._incremental_start = buffer:position_relative(buffer.current_pos,
- next and 1 or -1)
+ incremental_start = buffer:position_relative(buffer.current_pos,
+ next and 1 or -1)
end
- buffer:goto_pos(M._incremental_start or 0)
+ buffer:goto_pos(incremental_start or 0)
find(text, next, M.match_case and buffer.FIND_MATCHCASE or 0)
end
@@ -233,7 +235,7 @@ end
-- @name find_incremental
function M.find_incremental(text, next, anchor)
if text then find_incremental(text, next, anchor) return end
- M._incremental_start = buffer.current_pos
+ incremental_start = buffer.current_pos
ui.command_entry:set_text('')
ui.command_entry.enter_mode('find_incremental')
end