Closed
Description
Description
When hitting enter with the cursor on a line with some file name, the file opens in a new buffer, but the nvim-tree doesn't autoclose. Upon trying to move cursor in the nvim-tree window, a number of errors pop up. For some reason the problem does not occur with hijack_cursor = false
. The last commit without this bug is 96a783f.
Neovim version
NVIM v0.9.2
Build type: RelWithDebInfo
LuaJIT 2.1.1694082368
Operating system and version
Windows 10
Windows variant
No response
nvim-tree version
Clean room replication
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=F:/nvt-min/site]]
local package_root = "F:/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
_G.setup = function()
require("nvim-tree").setup {
hijack_cursor = true,
view = {
float = {
enable = true,
},
},
}
end
Steps to reproduce
nvim -nu F:/nvt-min/nvt-min.lua
:e .
- Position cursor on some file
- Hit Enter
Expected behavior
No response
Actual behavior
No response