[vim/vim] Display line number with signcolumn=number when sign text is empty (Issue #17169)

10 views
Skip to first unread message

Finite State Machine

unread,
Apr 20, 2025, 12:05:14 PMApr 20
to vim/vim, Subscribed

Steps to reproduce

VIm has the same bug once reported to NeoVim: neovim/neovim#14587:

When set number signcolumn=number and a sign having only numhl=... is present on a line, VIm overwrites the line number with the sign's text (which is blank).

The relevant VIm code is likely in src/drawline.c near line 370 as of 9943d47 (v9.1.1243, last modified 2025-03-26).

Screenshot.2025-04-20.at.11.55.02.png (view on web)
Screenshot: lines 1004, 1011, and 1016 have no signs; their line numbers are shown. Every other line has exactly one of these two signs: covered (numhl=... with ctermbg=green ctermfg=black) or uncovered (same, but ctermbg=red). Lines 1012-1015 also have a sign with text (W>) showing a warning from the LSP; this demonstrates that it's not formatting causing the line numbers to be invisible.

Expected behaviour

When set number signcolumn=number and a sign having only numhl=... is present on a line, that line should be rendered with the highlight referenced by numhl applied to the actual line number, as shown in this hasty mockup:
Screenshot.2025-04-20.at.11.55.02.expected.png (view on web)

Version of Vim

9.1.1250

Environment

macOS 15.3
iTerm2 3.5.13beta1
TERM=xterm
SHELL=bash 5.2 from homebrew

Logs and stack traces


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/issues/17169@github.com>

finite-state-machine created an issue (vim/vim#17169)

Steps to reproduce

VIm has the same bug once reported to NeoVim: neovim/neovim#14587:

When set number signcolumn=number and a sign having only numhl=... is present on a line, VIm overwrites the line number with the sign's text (which is blank).

The relevant VIm code is likely in src/drawline.c near line 370 as of 9943d47 (v9.1.1243, last modified 2025-03-26).

Screenshot.2025-04-20.at.11.55.02.png (view on web)
Screenshot: lines 1004, 1011, and 1016 have no signs; their line numbers are shown. Every other line has exactly one of these two signs: covered (numhl=... with ctermbg=green ctermfg=black) or uncovered (same, but ctermbg=red). Lines 1012-1015 also have a sign with text (W>) showing a warning from the LSP; this demonstrates that it's not formatting causing the line numbers to be invisible.

Expected behaviour

When set number signcolumn=number and a sign having only numhl=... is present on a line, that line should be rendered with the highlight referenced by numhl applied to the actual line number, as shown in this hasty mockup:
Screenshot.2025-04-20.at.11.55.02.expected.png (view on web)

Version of Vim

9.1.1250

Environment

macOS 15.3
iTerm2 3.5.13beta1
TERM=xterm
SHELL=bash 5.2 from homebrew

Logs and stack traces


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

Christian Brabandt

unread,
Apr 20, 2025, 12:34:55 PMApr 20
to vim/vim, Subscribed

thanks, would you mind creating a PR with a test then please?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17169/2817246018@github.com>

chrisbra left a comment (vim/vim#17169)

thanks, would you mind creating a PR with a test then please?


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/issues/17169/2817246018@github.com>

Christian Brabandt

unread,
May 10, 2025, 9:03:35 AMMay 10
to vim/vim, Subscribed

Closed #17169 as completed via 1b18683.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/17169/issue_event/17602098322@github.com>

Reply all
Reply to author
Forward
0 new messages