[vim/vim] Fix left window 'winhighlight' being used when drawing middle statusline separator (PR #19980)

7 views
Skip to first unread message

Foxe Chen

unread,
Apr 14, 2026, 7:55:25 PMApr 14
to vim/vim, Subscribed

This was caused by #19951:

https://github.com/user-attachments/assets/2aad191f-5e82-4c85-8a76-89954967abb0


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

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

Commit Summary

  • c770362 fix left window 'winhighlight' being used when drawing right window

File Changes

(4 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19980@github.com>

h_east

unread,
Apr 15, 2026, 10:23:34 AMApr 15
to vim/vim, Subscribed

@h-east commented on this pull request.


In src/highlight.c:

> @@ -5804,9 +5805,10 @@ set_highlight_attr(hl_override_T *arr, int len, bool update_ids)
     bool
 push_highlight_overrides(hl_override_T *arr, int len)
 {
-    // Don't want to do anything if "arr" is NULL or if "arr" is already the
-    // current override.
-    if (arr == NULL || (overrides != NULL && overrides->arr == arr))
+    // Don't want to do anything if "arr" is already the current override. If
+    // "arr" is NULL, then still push an override, but "->arr" will just be
+    // NULL so any previous overrides are cleared.
+    if (arr != NULL && overrides != NULL && overrides->arr == arr)

I don't think arr != NULL && is necessary.
While it's not incorrect since push/pop are supported, it will result in unnecessary alloc/free operations.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19980/review/4114340753@github.com>

Foxe Chen

unread,
Apr 15, 2026, 10:26:42 AMApr 15
to vim/vim, Push

@64-bitman pushed 1 commit.

  • 703682d fix left window 'winhighlight' being used when drawing right window


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19980/before/c770362366e67b32478a89c55b947d861fd2ae2c/after/703682d0bc6c9ca6f0de34ade2f4d8115ad22c1b@github.com>

Christian Brabandt

unread,
Apr 15, 2026, 12:51:32 PMApr 15
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19980)

thanks both


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19980/c4253882785@github.com>

Christian Brabandt

unread,
Apr 15, 2026, 1:00:05 PMApr 15
to vim/vim, Subscribed

Closed #19980 via 2252d2c.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19980/issue_event/24537277959@github.com>

Reply all
Reply to author
Forward
0 new messages