From cad3be0b0afa612dd87b762182ea25ebbe4ec891 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 6 Apr 2016 22:30:12 -0400 Subject: Do not assume 1-byte characters in incremental find; modules/textadept/keys.lua --- modules/textadept/keys.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') 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 } -- cgit v1.2.3