From 4ddd6c53bd9ed33ba85d74f3774341705a0c1f4b Mon Sep 17 00:00:00 2001 From: Matt Wozniski Date: Tue, 4 Jan 2022 01:00:06 -0500 Subject: fix(screen): don't put empty sign text in line number column When `signcolumn=number` but no sign on a given line has any text, display the line's line number instead of the (empty) sign text in the line number column. --- src/nvim/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index b1ca8c5805..d4688f7782 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2792,7 +2792,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc // in 'lnum', then display the sign instead of the line // number. if (*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u' - && num_signs > 0) { + && num_signs > 0 && sign_get_attr(SIGN_TEXT, sattrs, 0, 1)) { int count = win_signcol_count(wp); get_sign_display_info(true, wp, lnum, sattrs, row, startrow, filler_lines, filler_todo, count, -- cgit