[vim/vim] runtime(folds): update foldcolumn overflow logic (PR #20280)

4 views
Skip to first unread message

Matei Stroia

unread,
May 21, 2026, 12:11:36 PMMay 21
to vim/vim, Subscribed

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.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20280

Commit Summary

  • 1cbfb85 runtime(folds): update foldcolumn overflow logic

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20280@github.com>

Christian Brabandt

unread,
May 21, 2026, 3:02:26 PMMay 21
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20280)

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


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20280/c4511855689@github.com>

Christian Brabandt

unread,
4:53 PM (6 hours ago) 4:53 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20280)

The current behaviour is documented and serves exactly the purpose. In addition we have the "foldinner" 'fillchar' since v9.1.1819 which you can already use to get rid of the digits. But I am not going to change the default and I don't see the big improvement that this PR brings. So sorry, no.


Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20280/c4663916457@github.com>

Reply all
Reply to author
Forward
0 new messages