fix: update to buf directory implementation
This commit is contained in:
@@ -311,15 +311,17 @@ function M.open_on_directory()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if view.win_open() and #api.nvim_list_wins() > 1 then
|
|
||||||
view.close()
|
view.close()
|
||||||
end
|
|
||||||
M.hijack_current_window()
|
|
||||||
vim.api.nvim_buf_delete(buf, { force = true })
|
|
||||||
lib.change_dir(bufname)
|
lib.change_dir(bufname)
|
||||||
lib.set_index_and_redraw(bufname)
|
M.hijack_current_window()
|
||||||
|
|
||||||
|
view.open()
|
||||||
view.focus()
|
view.focus()
|
||||||
view.replace_window()
|
view.replace_window()
|
||||||
|
|
||||||
|
lib.set_index_and_redraw(bufname)
|
||||||
|
vim.api.nvim_buf_delete(buf, { force = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.reset_highlight()
|
function M.reset_highlight()
|
||||||
|
|||||||
@@ -300,8 +300,10 @@ function M.close()
|
|||||||
vim.cmd "new"
|
vim.cmd "new"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if #a.nvim_list_wins() > 1 then
|
||||||
a.nvim_win_hide(M.get_winnr())
|
a.nvim_win_hide(M.get_winnr())
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- Returns the window number for nvim-tree within the tabpage specified
|
--- Returns the window number for nvim-tree within the tabpage specified
|
||||||
---@param tabpage number: (optional) the number of the chosen tabpage. Defaults to current tabpage.
|
---@param tabpage number: (optional) the number of the chosen tabpage. Defaults to current tabpage.
|
||||||
|
|||||||
Reference in New Issue
Block a user