aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Wozniski <godlygeek+git@gmail.com>2022-01-04 01:00:06 -0500
committerMatt Wozniski <godlygeek+git@gmail.com>2022-01-04 01:49:40 -0500
commit4ddd6c53bd9ed33ba85d74f3774341705a0c1f4b (patch)
tree757fbff434ab4f8b58d3f0cf558b4487d09a0542 /src
parent207307d0faf9b821cfd3cfeae4d027ab9ee5dbdb (diff)
downloadrneovim-4ddd6c53bd9ed33ba85d74f3774341705a0c1f4b.tar.gz
rneovim-4ddd6c53bd9ed33ba85d74f3774341705a0c1f4b.tar.bz2
rneovim-4ddd6c53bd9ed33ba85d74f3774341705a0c1f4b.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/screen.c2
1 files changed, 1 insertions, 1 deletions
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,