* refactor(#2826): add View.bufnr and use for all public methods * use View.bufnr for all internal methods * revert View.bufnr, add buffer local autocommands * View revert to globals.BUFNR_BY_TABID until bufnr and winid are tracked for the view * View track winids and bufnrs via events
This commit is contained in:
committed by
GitHub
parent
a9156c0139
commit
65bae44922
@@ -165,22 +165,6 @@ function Explorer:create_autocmds()
|
||||
end,
|
||||
})
|
||||
|
||||
-- prevent new opened file from opening in the same window as nvim-tree
|
||||
vim.api.nvim_create_autocmd("BufWipeout", {
|
||||
group = self.augroup_id,
|
||||
pattern = "NvimTree_*",
|
||||
callback = function()
|
||||
if not utils.is_nvim_tree_buf(0) then
|
||||
return
|
||||
end
|
||||
if self.opts.actions.open_file.eject then
|
||||
self.view:prevent_buffer_override()
|
||||
else
|
||||
self.view:abandon_current_window()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = self.augroup_id,
|
||||
pattern = "NvimTree_*",
|
||||
|
||||
Reference in New Issue
Block a user