Skip to content

Update foldcolumn overflow logic#20280

Open
matystroia wants to merge 1 commit into
vim:masterfrom
matystroia:foldcolumn-overflow
Open

Update foldcolumn overflow logic#20280
matystroia wants to merge 1 commit into
vim:masterfrom
matystroia:foldcolumn-overflow

Conversation

@matystroia
Copy link
Copy Markdown

See neovim/neovim#39916 and my comment (neovim/neovim#39916 (comment)). This PR implements the 2nd solution.

Current foldcolumn behavior when fdc=3:

-  line 1
|- line 2
2- line 3
23 line 4

Proposed behavior:

-  line 1
|- line 2
2- line 3
2| line 4

And with fdc=4:

-   line 1
|-  line 2
||- line 3
2|- line 4
2|| line 5

On lines where we can't draw all the fold levels, this would turn the first column into a spill indicator. Thus 2| would mean there are two fold levels that are "collapsed".

IMO this is a better use of the limited space than always displaying [n-1][n], and is a bit clearer visually.

@chrisbra
Copy link
Copy Markdown
Member

Thanks but I am a bit unsure. Like to hear from others first.

@zeertzjq zeertzjq changed the title runtime(folds): update foldcolumn overflow logic Update foldcolumn overflow logic May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants