fix: update to buf directory implementation

This commit is contained in:
kiyan
2021-10-01 14:04:07 +02:00
parent 1b04082872
commit 1fe211eda0
2 changed files with 11 additions and 7 deletions

View File

@@ -311,15 +311,17 @@ function M.open_on_directory()
return
end
if view.win_open() and #api.nvim_list_wins() > 1 then
view.close()
end
M.hijack_current_window()
vim.api.nvim_buf_delete(buf, { force = true })
view.close()
lib.change_dir(bufname)
lib.set_index_and_redraw(bufname)
M.hijack_current_window()
view.open()
view.focus()
view.replace_window()
lib.set_index_and_redraw(bufname)
vim.api.nvim_buf_delete(buf, { force = true })
end
function M.reset_highlight()