aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/keys.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-04-06 22:30:12 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-04-06 22:30:12 -0400
commitcad3be0b0afa612dd87b762182ea25ebbe4ec891 (patch)
treeb3d0435d4214d31348f96c293f75155ac7ec0fcf /modules/textadept/keys.lua
parentac258ebb97088c01cd4be192e1255d60afce7b8b (diff)
downloadtextadept-cad3be0b0afa612dd87b762182ea25ebbe4ec891.tar.gz
textadept-cad3be0b0afa612dd87b762182ea25ebbe4ec891.zip
Do not assume 1-byte characters in incremental find; modules/textadept/keys.lua
Diffstat (limited to 'modules/textadept/keys.lua')
-rw-r--r--modules/textadept/keys.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index 8b88cdbc..6e77911a 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -627,7 +627,8 @@ keys.find_incremental = {
ui.find.find_incremental(ui.command_entry:get_text(), false, true)
end,
['\b'] = function()
- ui.find.find_incremental(ui.command_entry:get_text():sub(1, -2), true)
+ local e = ui.command_entry:position_before(ui.command_entry.length)
+ ui.find.find_incremental(ui.command_entry:text_range(0, e), true)
return false -- propagate
end
}