diff options
author | 2013-07-08 09:51:27 -0400 | |
---|---|---|
committer | 2013-07-08 09:51:27 -0400 | |
commit | 49a4d17618c2e3454c5f5fe37492a283c7c55cc2 (patch) | |
tree | cd5d82785a86c7ceb6aa8eb31c96ac6d232012cc | |
parent | bda4a0b0c97107df86f68ce47f93949bae101065 (diff) | |
download | textadept-49a4d17618c2e3454c5f5fe37492a283c7c55cc2.tar.gz textadept-49a4d17618c2e3454c5f5fe37492a283c7c55cc2.zip |
Fixed bug in Lua Pattern "Replace All"; modules/textadept/find.lua
Do not match pattern anchors.
-rw-r--r-- | modules/textadept/find.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index d7c34fd3..50b557ba 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -144,7 +144,7 @@ local function find_(text, next, flags, no_wrap, wrapped) local e = next and buffer.length or buffer.current_pos local caps = {buffer:text_range(s, e):find(next and patt or '^.*()'..patt)} M.captures = {table.unpack(caps, next and 3 or 4)} - if #caps > 0 then + if #caps > 0 and caps[2] >= caps[1] then pos, e = s + caps[next and 1 or 3] - 1, s + caps[2] buffer:set_sel(e, pos) end |