From bb0cb4fcd086bc27d787dd02f8b8cfbce1c83c5f Mon Sep 17 00:00:00 2001 From: Michael Spradling Date: Thu, 17 Mar 2022 12:01:21 -0400 Subject: [PATCH] Do not close outline when focus_location occurs When auto_close is set to false, this patch does nothing. However, when auto_close is set to true now the outline only closes when the goto_location action is taken. The action focus_location still keeps the outline open. --- lua/symbols-outline.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/symbols-outline.lua b/lua/symbols-outline.lua index bf253d1..2c71725 100644 --- a/lua/symbols-outline.lua +++ b/lua/symbols-outline.lua @@ -67,9 +67,9 @@ function M._goto_location(change_focus) vim.api.nvim_win_set_cursor(M.state.code_win, { node.line + 1, node.character }) if change_focus then vim.fn.win_gotoid(M.state.code_win) - end - if config.options.auto_close then - M.close_outline() + if config.options.auto_close then + M.close_outline() + end end end