aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-08-26 22:26:39 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-08-26 22:26:39 -0400
commitd4db80a3d354ba3c39038c8fb4a1477516fec6d8 (patch)
tree2e628d75113029f077af5d8b56eadea76d05a383 /modules/textadept
parente5ec0398da2123bf4777c023c7e21b284c74cca8 (diff)
downloadtextadept-d4db80a3d354ba3c39038c8fb4a1477516fec6d8.tar.gz
textadept-d4db80a3d354ba3c39038c8fb4a1477516fec6d8.zip
Fixed infinite loop bug with Lua pattern search; modules/textadept/find.lua
Diffstat (limited to 'modules/textadept')
-rw-r--r--modules/textadept/find.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index eafef5ed..a1f873fe 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -64,7 +64,7 @@ local function find_(text, next, flags, nowrap, wrapped)
elseif flags < 16 then -- lua pattern search (forward search only)
text = text:gsub('\\[abfnrtv\\]', escapes)
local buffer_text = buffer:get_text(buffer.length)
- local results = { buffer_text:find(text, buffer.anchor + increment) }
+ local results = { buffer_text:find(text, buffer.anchor + increment + 1) }
if #results > 0 then
result = results[1]
find.captures = { unpack(results, 3) }