bug: Statusline symbols from previous buffer shown on buffer with buftype = 'nofile' #602
Open
4 tasks done
Labels
bug
Something isn't working
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.2 Build type: Release LuaJIT 2.1.1727870382
Operating system/version
MacOS 15.0.1
Describe the bug
Statusline symbols from a previous buffer are shown on the current buffer if the
buftype
of the current buffer is'nofile'
. First noticed when using Neogit but also happens with:checkhealth
:In the above example,
:=require('trouble.view.main'):get()
returns::=require('trouble.view.main')._main
::=require('trouble.view.main')._buf
:nil
It seems like it's happening because buffers with
buftype ~= ""
are being ignored. Commenting out thisbuftype ~= ""
check fixes it:trouble.nvim/lua/trouble/view/main.lua
Lines 48 to 50 in 3dc00c0
But I don't know if that's the "right" way to fix it.
Steps To Reproduce
nvim -u repro.lua lua/trouble/config/init.lua
:checkhealth
Note: I was getting some weirdness where mason wouldn't correctly install lua_ls with repro.lua. If you get an error about lua_ls, just
:MasonInstall lua-language-server
to fix it.Expected Behavior
No statusline symbols are displayed for the health window
Repro
The text was updated successfully, but these errors were encountered: