kevinhwang91 / nvim-ufo

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

UFO auto closes all folds (zM) on text change #11

Closed ziontee113 closed 2 years ago

ziontee113 commented 2 years ago

Neovim version (nvim -v | head -n1)

0.7

Operating system/version

Arch Linux

How to reproduce the issue

https://user-images.githubusercontent.com/102876811/174476410-87af1302-71de-47bc-bc1d-b0bb4cefdb89.mp4

Expected behavior

I want to open / close my folds manually.

Actual behavior

It closes all folds when the text change.

kevinhwang91 commented 2 years ago

https://github.com/kevinhwang91/nvim-ufo/issues/7

It's easily solved by saving foldlevel before zR and restoring after. I am considering add an action for that.

ziontee113 commented 2 years ago

Thanks for the plugin :)

sainttttt commented 4 months ago

I'm having this same issue and nothing seems to fix it. Any text change auto closes everything.