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

In the nvim 0.9 version, after using zc to open the fold, the fold text occasionally does not disappear. #132

Closed lu5je0 closed 1 year ago

lu5je0 commented 1 year ago

Neovim version (nvim -v | head -n1)

NVIM v0.9.0

Operating system/version

macOS 13.3.1

How to reproduce the issue

cat mini.lua

-- Use Vim packages install the plugin, also work with some plugins manager such as packer.nvim
vim.o.packpath = '~/.local/share/nvim/site'
vim.cmd('packadd promise-async')
vim.cmd('packadd nvim-ufo')

-- Setting
vim.o.foldcolumn = '1'
vim.o.foldlevel = 99
vim.o.foldlevelstart = -1
vim.o.foldenable = true

local ufo = require('ufo')
ufo.setup()
vim.keymap.set('n', 'zR', ufo.openAllFolds)
vim.keymap.set('n', 'zM', ufo.closeAllFolds)

nvim --clean +'so mini.lua'

1. 2. 3. ...

Expected behavior

After opening the fold with zc, the fold text should be removed immediately.

image

Actual behavior

image
rockyzhang24 commented 1 year ago

I cannot reproduce this issue. Btw, zc is to close a fold not open, so do you mean zo?

kevinhwang91 commented 1 year ago

I know this issue for a long time. To open a fold in a clean ENV like nvim in docker, open_fold_hl_timeout won't work. We can't reproduce because of our neovim have redrawed in some reasons.

lu5je0 commented 1 year ago

Thanks!