patch 9.1.1378: sign without text overwrites number option
Problem: When 'signcolumn' is set to `number` but a line has a sign
without text, the line number disappears (finite-state-machine)
Solution: Verify that a sign actually contains text before rendering the
line number (glepnir)
fixes: #17169
closes: #17282
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/drawline.c b/src/drawline.c
index a14dd90..57ee9a5 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -388,7 +388,8 @@
// 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