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.
This commit is contained in:
Michael Spradling
2022-03-17 12:01:21 -04:00
parent 1361738c47
commit bb0cb4fcd0

View File

@@ -67,10 +67,10 @@ function M._goto_location(change_focus)
vim.api.nvim_win_set_cursor(M.state.code_win, { node.line + 1, node.character }) vim.api.nvim_win_set_cursor(M.state.code_win, { node.line + 1, node.character })
if change_focus then if change_focus then
vim.fn.win_gotoid(M.state.code_win) vim.fn.win_gotoid(M.state.code_win)
end
if config.options.auto_close then if config.options.auto_close then
M.close_outline() M.close_outline()
end end
end
end end
function M._highlight_current_item(winnr) function M._highlight_current_item(winnr)