From f6aba661ec4488ffeb134071e065154413e16af2 Mon Sep 17 00:00:00 2001 From: smhc Date: Fri, 4 Mar 2022 08:43:14 +1000 Subject: [PATCH] Close help on q/close instead of ignore keypress (#1043) Co-authored-by: Shane Hird --- lua/nvim-tree/actions/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/nvim-tree/actions/init.lua b/lua/nvim-tree/actions/init.lua index 8d2d527b..9726178f 100644 --- a/lua/nvim-tree/actions/init.lua +++ b/lua/nvim-tree/actions/init.lua @@ -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