statusline: blend status line highlight into adjacent vsep cells by h-east · Pull Request #20182 · vim/vim · GitHub
Skip to content

statusline: blend status line highlight into adjacent vsep cells - #20182

Closed
h-east wants to merge 2 commits into
vim:masterfrom
h-east:stl-vsep-borrow-curwin-hl
Closed

h-east wants to merge 2 commits into
vim:masterfrom
h-east:stl-vsep-borrow-curwin-hl

Conversation

@h-east

@h-east h-east commented May 10, 2026

Copy link
Copy Markdown
Member
Problem:  When two windows are placed side by side with vsplit and
          their status lines are connected (the cell between them
          is drawn with the 'stl' / 'stlnc' fillchar, not the
          'vert' character), that connecting cell still uses the
          VertSplit highlight.  The status line bar therefore
          looks broken at the separator column, and any custom
          edge highlight set in 'statusline' (%#XX# / %N*) is cut
          off there.
Solution: Make that connecting cell take the highlight from the
          neighbouring status line edge instead of VertSplit:
            - Next to the current window, use the current
              window's edge highlight, so the StatusLine bar (and
              any %#... at the edge) extends into the column
              without a seam.
            - Between two non-current windows whose status
              fillchar is a space, use the left window's
              right-edge highlight, so the StatusLineNC bar is
              continuous across the column too.
          Cells drawn with the 'vert' character (the two windows
          do not share a status line) keep the VertSplit
          highlight as before.

          Add Test_statusline_vsep_borrow_hl with two layouts
          (NC | cur | NC | NC and NC | NC | cur | NC) so all
          three cases above are covered.

Related: #19951
Related: #20089
Related: #20167

@h-east

h-east commented May 10, 2026

Copy link
Copy Markdown
Member Author

@h-east
h-east force-pushed the stl-vsep-borrow-curwin-hl branch 5 times, most recently from 816997f to 4557070 Compare May 11, 2026 05:52
@h-east

h-east commented May 11, 2026

Copy link
Copy Markdown
Member Author

Done.

@chrisbra

Copy link
Copy Markdown
Member

Thanks. @bfrg and Rob, any comments?

@bfrg

bfrg commented May 11, 2026

Copy link
Copy Markdown
Contributor

@h-east Thank you! Looks good from my side.

h-east and others added 2 commits May 14, 2026 20:10
Problem:  When two windows are placed side by side with vsplit and
          their status lines are connected (the cell between them
          is drawn with the 'stl' / 'stlnc' fillchar, not the
          'vert' character), that connecting cell still uses the
          VertSplit highlight.  The status line bar therefore
          looks broken at the separator column, and any custom
          edge highlight set in 'statusline' (%#XX# / %N*) is cut
          off there.
Solution: Make that connecting cell take the highlight from the
          neighbouring status line edge instead of VertSplit:
            - Next to the current window, use the current
              window's edge highlight, so the StatusLine bar (and
              any %#... at the edge) extends into the column
              without a seam.
            - Between two non-current windows whose status
              fillchar is a space, use the left window's
              right-edge highlight, so the StatusLineNC bar is
              continuous across the column too.
          Cells drawn with the 'vert' character (the two windows
          do not share a status line) keep the VertSplit
          highlight as before.

          Add Test_statusline_vsep_borrow_hl with two layouts
          (NC | cur | NC | NC and NC | NC | cur | NC) so all
          three cases above are covered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@h-east
h-east force-pushed the stl-vsep-borrow-curwin-hl branch from 4557070 to 1c223c6 Compare May 14, 2026 11:10
@h-east

h-east commented May 14, 2026

Copy link
Copy Markdown
Member Author

@chrisbra I think it's probably fine, so let's merge it.

If any complaints arise, I will address them honestly 💁

@chrisbra

Copy link
Copy Markdown
Member

@chrisbra chrisbra closed this in b467b56 May 15, 2026
@h-east
h-east deleted the stl-vsep-borrow-curwin-hl branch May 15, 2026 23:41
chrisbra pushed a commit that referenced this pull request Aug 5, 2026
…he old highlight

Problem:  When 'statusline' is set, the cell below a vertical separator keeps
          the highlight of the previous status line update and only catches
          up on the next key press (dougaak).
Solution: Also update that cell when the status line of the current window is
          redrawn while showing the ruler (Hirohito Higashi).

related: #20182
fixes:   #20948
closes:  #20949

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra pushed a commit that referenced this pull request Sep 15, 2026
Problem:  borrow_stl_vsep_hl() takes the status line highlight from the
          cell before the vertical separator, which a window of zero
          width does not have: the cell before the screen is read.  With
          the windows laid out for a size the GUI has not reached, the
          rows below the screen are read as well, which crashes gvim on
          MS-Windows in test_popup.vim since the tests redraw the shell
          after setting its size (after v9.2.0488).
Solution: Skip a window of zero width and stay inside the screen.
          Test_statusline_vsep_borrow_zero_width_window() puts a zero by
          zero window next to another one with both status lines on the
          first screen line, which reads before the screen without the fix.
          (Hirohito Higashi).

fixes:   vim/vim-win32-installer#487
related: #20182
closes:  #21313

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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.

3 participants