You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When navigating up a directory tree with the preview window open, view_options.show_hidden = true, and using -, the file list will fail to render after a couple of navigations.
What is the severity of this bug?
breaking (some functionality is broken) tolerable (can work around it)
Steps To Reproduce
Here's a recording of the bug for me.
oil_nvim_render_fails_with_preview_open.mov
Open Oil.
Enable the preview window.
Begin navigating up the directory tree with -.
After pressing - a twice, the file list buffer fails to populate. This happens reliably for me, regardless of what file I'm initially on when I open Oil.
Expected Behavior
The file list should be rendered.
Directory structure
No response
Repro
-- save as repro.lua-- run with nvim -u repro.lua-- DO NOT change the pathslocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "runtime", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
{
"stevearc/oil.nvim",
config=function()
require("oil").setup({
-- add any needed settings hereview_options= {show_hidden=true}
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Did you check the bug with a clean config?
I have confirmed that the bug reproduces with nvim -u repro.lua using the repro.lua file above.
Thoughts
Given that the bug only occurs when hidden files are enabled, I suspect it has something to do with the top .. entry.
EDIT 1: It appears that this autocommand runs when the list renders properly, and doesn't run when it fails to render.
Did you check the docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0
Operating system/version
macOS Sonoma v14.6.1
Describe the bug
When navigating up a directory tree with the preview window open,
view_options.show_hidden = true
, and using-
, the file list will fail to render after a couple of navigations.What is the severity of this bug?
breaking (some functionality is broken)tolerable (can work around it)Steps To Reproduce
Here's a recording of the bug for me.
oil_nvim_render_fails_with_preview_open.mov
-
.-
a twice, the file list buffer fails to populate. This happens reliably for me, regardless of what file I'm initially on when I open Oil.Expected Behavior
The file list should be rendered.
Directory structure
No response
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.Thoughts
Given that the bug only occurs when hidden files are enabled, I suspect it has something to do with the top
..
entry.EDIT 1: It appears that this autocommand runs when the list renders properly, and doesn't run when it fails to render.
EDIT 2: When the list fails to render, the
filetype
is unset. Could explain why the autocommand isn't running.EDIT 3: Confirmed that removing the
".."
entry from the list solves the issue. Lowering the severity to "tolerable".The text was updated successfully, but these errors were encountered: