diff options
| author | 2014-11-29 15:43:31 -0500 | |
|---|---|---|
| committer | 2014-11-29 15:43:31 -0500 | |
| commit | 6ab70838082049d3236a66a63c4efeddf4dbfdc2 (patch) | |
| tree | d370226248083c7f3c33fc1c2a57edd3188f63b9 | |
| parent | 60a6d68b8806768740fc5c19f82add73f5750cd3 (diff) | |
| download | textadept-6ab70838082049d3236a66a63c4efeddf4dbfdc2.tar.gz textadept-6ab70838082049d3236a66a63c4efeddf4dbfdc2.zip | |
Show symbol documentation in the Lua command entry; modules/textadept/keys.lua
| -rw-r--r-- | modules/textadept/keys.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index eae664c8..6ea0c54a 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -632,5 +632,13 @@ 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:get_text()..k, true) end}) +-- Show documentation for symbols in the Lua command entry. +keys.lua_command[not CURSES and 'ch' or 'mh'] = function() + -- Temporarily change _G.buffer since ui.command_entry is the "active" buffer. + local buffer = _G.buffer + _G.buffer = ui.command_entry + textadept.editing.show_documentation() + _G.buffer = buffer +end return M |
