Close help on q/close instead of ignore keypress (#1043)

Co-authored-by: Shane Hird <shane.hird@csgicorp.com>
This commit is contained in:
smhc
2022-03-04 08:43:14 +10:00
committed by GitHub
parent 690c7e96ed
commit f6aba661ec

View File

@@ -83,6 +83,9 @@ local keypress_funcs = {
}
function M.on_keypress(action)
if view.is_help_ui() and action == 'close' then
action = 'toggle_help';
end
if view.is_help_ui() and action ~= 'toggle_help' then return end
local node = lib.get_node_at_cursor()
if not node then return end