kevinhwang91 / nvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.
BSD 3-Clause "New" or "Revised" License
2.16k stars 37 forks source link

Restrict virtual text to local window folds #178

Closed ReubenM closed 7 months ago

ReubenM commented 7 months ago

Neovim version (nvim -v | head -n1)

0.9.4

Operating system/version

Linux

How to reproduce the issue

When defining a custom fold text function, the winnr is not passed as an argument to allow matching against current active window, so virtual text shows up in all windows with the same buffer, even though the folding is local to the window.

Expected behavior

Fold virtual text is applied locally to a buffer's windows where lines are folded.

Actual behavior

Fold virtual text is applied globally to a buffer's windows based on which lines are folded in the currently active window.

kevinhwang91 commented 7 months ago

Extmark is buffer local scope. https://github.com/kevinhwang91/nvim-ufo/issues/131#issuecomment-1807188169