-
Notifications
You must be signed in to change notification settings - Fork 180
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(statuscolumn): Adjacent folds not displaying correctly with foldopen #1533
Comments
That's because vim.keymap.set("n", "t", function() <-- foldlevel is some number here
fadskfjas
end)
vim.keymap.set("n", "s", function() <-- foldlevel here is the same as the previous
fjasiofaja
end) The opened markers show up only at lines where the foldlevel is not the same between the current and previous line. |
Actually, if we change the line here snacks.nvim/lua/snacks/statuscolumn.lua Line 147 in bc0630e
elseif config.folds.open and vim.treesitter.foldexpr(vim.v.lnum):sub(1, 1) == ">" then I believe it behaves more to how you describe.
|
For me, this solved the problem. However, as described in this issue, using |
Sorry, I just closed this question by accident. |
I see, you're right. I wasn't aware of that issue. Then probably my PR which essentially reverts the change that was made for that issue you mentioned will be denied. I'm not aware of a better solution in this case. Hopefully, maintainer will have a better idea with regards to this. Maybe it's possible maybe not. But I'll close my PR and wait for maintainer's input. |
The statuscol.nvim plugin can handle this situation correctly, but I can't understand its code. |
I pushed a change which somewhat takes into consideration I'm sure maintainer will have a more proper answer with regards to that. |
Did you check docs and existing issues?
Neovim version (nvim -v)
0.11.0-dev-1930+gb2fa51bf15
Operating system/version
macOS 15.3.1
Describe the bug
When there are two adjacent folds, the part that determines whether a line is the beginning of a fold may not work properly. This is because when two folds are adjacent, the foldlevel of the previous line of the latter fold may be the same as that of the previous line, causing this line to be considered a line in a fold.
a simple example:
line 361 does not display the foldopen symbol.
Steps To Reproduce
statuscolumn
section in the configuration has theopen
option set to trueExpected Behavior
Correctly display foldopen symbols for adjacent folds.
Repro
The text was updated successfully, but these errors were encountered: