Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Searching within a fold closes it #27

Closed
akinsho opened this issue Jun 28, 2022 · 2 comments
Closed

[Bug] Searching within a fold closes it #27

akinsho opened this issue Jun 28, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@akinsho
Copy link

akinsho commented Jun 28, 2022

Neovim version (nvim -v | head -n1)

NVIM v0.8.0-dev+1941-gb7084fef4

Operating system/version

macOS 12.4

How to reproduce the issue

  1. Use the following init.lua via nvim -u <minimal-init> --no-plugin <file-with-folds>
vim.cmd("packadd! nvim-ufo")

vim.opt.termguicolors = true
vim.opt.foldlevelstart = 2
vim.opt.foldenable = true

require("ufo").setup()
  1. go to a closed fold, open it with zo
  2. search for any item within the fold using either :call search('thing') or /thing<CR>
  3. Fold is closed

Expected behavior

Searching inside a folded area should not cause the fold to be closed

Actual behavior

Searching inside a folded area causes the fold to close back up

nvim-ufo-bug.mov
@akinsho akinsho added the bug Something isn't working label Jun 28, 2022
@kevinhwang91
Copy link
Owner

ufo listen CmdlineLeave to update the fold.
The issue is similar to #7
Set a large foldlevel value.

@kevinhwang91
Copy link
Owner

can be improved by checking the changedtick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants