Closed stevanmilic closed 2 years ago
Look like the buffer is detached and can't be synced.
Make sure lua =require'ufo.bufmanager'.buffers[vim.api.nvim_get_current_buf()].attached
output true
And lua =require'ufo.bufmanager'.buffers[vim.api.nvim_get_current_buf()]:lines(0, -1)
output the synced lines.
Edit: It's your foldtext
option that has been changed by another plug.
hmm could be, I've been using pretty-fold
before ufo, but I'm not sure how could it affect the foldtext
since it's deleted, could be that smth is cached tho
It's also a bug for ufo. foldtext
and fillchars
are global/window
options. When BufEnter
is fired, ufo should reset them.
This is my mistake after refactoring.
Got it, thanks for quickly resolving these issues 💪🏻
Neovim version (nvim -v | head -n1)
head
Operating system/version
macOS 12.4
How to reproduce the issue
I'm getting this strange output from time-to-time with tree-sitter provider. I'm not entirely sure if it's related to that provider only, since that's the only I'm using tho. Reloading the buffer makes the folded text correct again.
Expected behavior
For fold text to not have occasional strange suffix.
Actual behavior
Fold text sometimes gets buggy.