kevinhwang91 / nvim-ufo

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

The highlight of the folded line is covered by CursorLine #103

Closed rockyzhang24 closed 1 year ago

rockyzhang24 commented 1 year ago

Neovim version (nvim -v | head -n1)

NVIM v0.9.0-dev-667+gdd200db98

Operating system/version

macOS 13.1

How to reproduce the issue

  1. Fold a piece of code. At this time, the highlight of the folded line is covered by CursorLine.
  2. Move the cursor up/down. The folded line is highlighted by UfoFoldedFg/Bg as expected.
  3. Move the cursor back. The highlight is covered by CursorLine again.

Expected behavior

The highlight of the folded line should not be covered by CursorLine when

  1. the cursor has not moved away after folding, and
  2. the cursor moves back to the folded line
kevinhwang91 commented 1 year ago

It's Vim behavior, not a bug for ufo, but can be an enhancement.

rockyzhang24 commented 1 year ago

Nice, bro. You're always the best.

kevinhwang91 commented 1 year ago

image hi UfoCursorFoldedLine guifg=#abb2bf guibg=#342e4f gui=bold,italic

Will improve perf if I have plenty of time.

itsuki0927 commented 5 months ago

prefold image

folded image

I've recently encountered this problem, how can I solve it?