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

foldlevel changed by zR, zM sometime buggy #7

Closed
kevinhwang91 opened this issue Jun 18, 2022 · 8 comments
Closed

foldlevel changed by zR, zM sometime buggy #7

kevinhwang91 opened this issue Jun 18, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@kevinhwang91
Copy link
Owner

Neovim version (nvim -v | head -n1)

NVIM v0.7.0

Operating system/version

ArchLinux

How to reproduce the issue

local function level1()
    local function level2()
        |
    end
end
  1. type zR, foldlevel become 2
  2. change buffer becomes:
local function level1()
    local function level2()
        if true then
            print('level3')
        end
    end
end

and enter normal mode, folds have applied, level3 is closed automatically.

Expected behavior

level 3 fold keeps open.

Actual behavior

image

@kevinhwang91 kevinhwang91 added the bug Something isn't working label Jun 18, 2022
@kevinhwang91
Copy link
Owner Author

Look like should mock zR and zM behavior but keep foldlevel value. Vim have v:count1 + zr and v:count1 + zm to change foldlevel, not bad to remap zR and zM.

@ziontee113

This comment was marked as outdated.

kevinhwang91 added a commit that referenced this issue Jun 19, 2022
like `zR` and `zM`, but keep foldlevel
@kevinhwang91
Copy link
Owner Author

kevinhwang91 commented Jun 19, 2022

Please update code.
use require('ufo').openAllFolds() and require('ufo').closeAllFolds() instead. For now, I leave this issue.

Edit: doc has been updated

@ziontee113
Copy link

Thank you, it's working 👍

@ranjithshegde

This comment was marked as off-topic.

@kevinhwang91

This comment was marked as off-topic.

@ziontee113

This comment was marked as resolved.

@kevinhwang91

This comment was marked as resolved.

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

3 participants