aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/command_entry.lua19
1 files changed, 9 insertions, 10 deletions
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua
index 34ebc7e8..db26b8f2 100644
--- a/modules/textadept/command_entry.lua
+++ b/modules/textadept/command_entry.lua
@@ -248,17 +248,16 @@ events.connect(events.INITIALIZED, function()
for i = 1, M.margins do M.margin_width_n[i] = 0 end
M.call_tip_position = true
for key, f in pairs(keys) do
- if f == textadept.editing.show_documentation then
- lua_keys[key] = function()
- -- Temporarily change _G.buffer and _G.view since ui.command_entry is
- -- the "active" buffer and view.
- local orig_buffer, orig_view = _G.buffer, _G.view
- _G.buffer, _G.view = ui.command_entry, ui.command_entry
- textadept.editing.show_documentation()
- _G.buffer, _G.view = orig_buffer, orig_view
- end
- break
+ if f ~= textadept.editing.show_documentation then goto continue end
+ lua_keys[key] = function()
+ -- Temporarily change _G.buffer and _G.view since ui.command_entry is
+ -- the "active" buffer and view.
+ local orig_buffer, orig_view = _G.buffer, _G.view
+ _G.buffer, _G.view = ui.command_entry, ui.command_entry
+ textadept.editing.show_documentation()
+ _G.buffer, _G.view = orig_buffer, orig_view
end
+ ::continue::
end
end)