From 1be7d50f3cee5aa4a06c083d195290e8fe8cacaf Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 5 Oct 2014 00:28:18 -0400 Subject: Replaced command entry text field with a Scintilla buffer. `ui.command_entry` now has the same functions and fields as `buffer`s as well as an additional `height` property. Note that when the command entry is active, `_G.buffer` is unchanged, so many existing key commands cannot be bound to command entry key modes. See `keys.lua_command` in *modules/textadept/command_entry.lua* for the proper way to bind them. Removed `ui.command_entry.entry_text` and `ui.command_entry.show_completions()`. --- modules/textadept/keys.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/textadept/keys.lua') diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 8904fc15..36161672 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -612,21 +612,21 @@ keys.filter_through = { } keys.find_incremental = { ['\n'] = function() - ui.find.find_entry_text = ui.command_entry.entry_text -- save - ui.find.find_incremental(ui.command_entry.entry_text, true, true) + ui.find.find_entry_text = ui.command_entry:get_text() -- save + ui.find.find_incremental(ui.command_entry:get_text(), true, true) end, ['cr'] = function() - ui.find.find_incremental(ui.command_entry.entry_text, false, true) + ui.find.find_incremental(ui.command_entry:get_text(), false, true) end, ['\b'] = function() - ui.find.find_incremental(ui.command_entry.entry_text:sub(1, -2), true) + ui.find.find_incremental(ui.command_entry:get_text():sub(1, -2), true) return false -- propagate end } -- Add the character for any key pressed without modifiers to incremental find. setmetatable(keys.find_incremental, {__index = function(t, k) if #k > 1 and k:find('^[cams]*.+$') then return end - ui.find.find_incremental(ui.command_entry.entry_text..k, true) + ui.find.find_incremental(ui.command_entry:get_text()..k, true) end}) return M -- cgit v1.2.3