// If 'signcolumn' is set to 'number' and a sign is present
// in 'lnum', then display the sign instead of the line
// number.
- if ((*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u') && sign_present)
+ if ((*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u') && sign_present
+ && wlv->sattr.sat_text != NULL)
get_sign_display_info(TRUE, wp, wlv);
else
#endif
--- /dev/null
+| +0#ffffff16#ff404010|>@1| >a+0#0000000#ffffff0| @69
+| +0#ffffff16#ff404010@1|2| |b+0#0000000#ffffff0| @69
+| +0#af5f00255&@1|3| |c+0#0000000&| @69
+|~+0#4040ff13&| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
eval test_null_list()->sign_unplacelist()
endfunc
+func Test_sign_number_without_signtext()
+ CheckScreendump
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ set number signcolumn=number
+ call setline(1, ['a', 'b', 'c'])
+ sign define SignA text=>> texthl=Search numhl=Error
+ sign define SignB numhl=Error
+ sign place 1 line=1 name=SignA buffer=1
+ sign place 2 line=2 name=SignB buffer=1
+ END
+ call writefile(lines, 'XtestSigncolumnNumber', 'D')
+ let buf = RunVimInTerminal('-S XtestSigncolumnNumber', {'rows': 5})
+ call VerifyScreenDump(buf, 'Test_sign_number_without_signtext', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab