Wrong fold column with a floating window
stevanmilic opened this issue · comments
Description
When floating window is opened the fold column is (wrongly) populated with (default nvim fillchars
) values, once the floating window is closed and cursor is moved (re-render happens) the fold column resets back to custom fillchars
config.
Config used:
local builtin = require("statuscol.builtin")
require("statuscol").setup({
segments = {
{ text = { "%s" } },
{
text = { builtin.lnumfunc },
condition = { true, builtin.not_empty },
},
{ text = { " ", builtin.foldfunc, " " } },
},
})
set fillchars+=stl:─,stlnc:─,fold:\ ,foldopen:\ ,foldsep:\ ,foldclose:
Without floating window
With floating window (Mason)
Let me know if additional details are needed 🙏🏻
Thanks for this great plugin!
Yes, this is a known limitation of vim.opt_local
, which cannot target specific buffers but is the better interface for comma-separated list options.
Would need to add a custom function which extracts the field values. Something which I neglected to do before in hopes Neovim would add support for this to nvim_get_option_value()
.