-
-
Notifications
You must be signed in to change notification settings - Fork 633
Description
Description
I like the tree
to stay open, but one day I run nvim-qt
in a somewhat underperforming Windows 10
computer, I found out that every time I open the tree
, I get stuck until I close the tree
.
Then I tried to find out what causes it to be stuck, in other words, what makes OptionSet
to be triggered repeatedly.
Neovim version
NVIM v0.9.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Operating system and version
Windows 10, Windows 11
nvim-tree version
Clean room replication
for name, url in pairs {
tree = 'https://github.com/nvim-tree/nvim-tree.lua.git',
devicons = 'https://github.com/nvim-tree/nvim-web-devicons.git',
} do
local install_path = vim.fn.fnamemodify([[C:\Users\llydr\Desktop\nv\nvt-min\]] .. name, ':p') -- TODO: Please change the path here!!!
if vim.fn.isdirectory(install_path) == 0 then vim.fn.system { 'git', 'clone', '--depth=1', url, install_path } end
vim.opt.runtimepath:append(install_path)
end
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require('nvim-tree').setup()
print 'Minimal Config Ready!'
local file = [[C:\Users\llydr\Desktop\nv\nvt-min\nvt-min.log]] -- TODO: Please change the path here!!!
vim.api.nvim_create_autocmd({ "CursorMoved", "TextChanged", "OptionSet", }, {
callback = function(ev)
vim.fn.writefile({ string.format([[%-3.3f %-2d %-20s - "%s"]], os.clock(), ev.buf, ev.event, ev.file) }, file, 'a')
end
})
Steps to reproduce
- cd C:\Users\llydr\Desktop\nv\nvt-min
- which nvim
/c/Users/llydr/Desktop/nv/nvim-win64/bin/nvim
- nvim -nu nvt-min.lua
- :NvimTreeOpen
- press
-
to goUp
or press<c-]>
toCD
into some folder. - observe whether the
nvt.min.log
file keeps growing. - When I type
:NvimTreeOpen
and pressEnter
, it just keeps getting bigger and bigger.
Expected behavior
When the tree
remains open, regardless of whether the tree
is active or inactive, and regardless of whether the tree is focused lost or gained, the OptionSet
is not triggered repeatedly.
Actual behavior
CursorMoved
, TextChanged
, OptionSet
are triggered repeatedly.
It will not be always triggered.
For example, when the tree
is:
~\Desktop\nv\nvt-min/..
devicons
tree
nvt-min.log
nvt-min.lua
or
~\Desktop\nv\nvt-min/..
devicons
tree
.git
.github
.hooks
doc
lua
scripts
.editorconfig
.luacheckrc
.luarc.json
.stylua.toml
CONTRIBUTING.md
LICENSE
README.md
nvt-min.log
nvt-min.lua
They would be triggered.
But when I CD
into tree
or devicons
, They would not be triggered.
Like this:
~\Desktop\nv\nvt-min\tree/..
.git
.github
.hooks
doc
lua
scripts
.editorconfig
.luacheckrc
.luarc.json
.stylua.toml
CONTRIBUTING.md
LICENSE
README.md