fix(open-file): focus file if already opened

This commit is contained in:
kiyan
2022-07-16 15:38:50 +02:00
parent 89becc7604
commit 4900d66370
3 changed files with 9 additions and 7 deletions

View File

@@ -54,7 +54,7 @@ local function get(where, node)
end
local function open_or_focus(node)
if node and not node.nodes and not utils.is_in_displayed_buffer(node.absolute_path) then
if node and not node.nodes and not utils.get_win_buf_from_path(node.absolute_path) then
open_file.fn("edit", node.absolute_path)
elseif node then
utils.focus_file(node.absolute_path)