diff options
author | 2014-10-05 00:28:18 -0400 | |
---|---|---|
committer | 2014-10-05 00:28:18 -0400 | |
commit | 1be7d50f3cee5aa4a06c083d195290e8fe8cacaf (patch) | |
tree | eff35c8d3adfbdf6a9678aba4a53592f9647d359 /modules/textadept/keys.lua | |
parent | 6de8b710a1fb0c818c22de19cefc125224555101 (diff) | |
download | textadept-1be7d50f3cee5aa4a06c083d195290e8fe8cacaf.tar.gz textadept-1be7d50f3cee5aa4a06c083d195290e8fe8cacaf.zip |
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()`.
Diffstat (limited to 'modules/textadept/keys.lua')
-rw-r--r-- | modules/textadept/keys.lua | 10 |
1 files changed, 5 insertions, 5 deletions
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 |