summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-19 16:31:28 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-19 16:31:28 +0200
commit4dff4aed09d2b0d570ca0d19de9cb08bdf03e695 (patch)
treef5766d4cd30da11862e47d4ebda66eb546b77392 /src/gui.c
parentbf8c3adef21c24a9bf2c1a93042a096ea8d8b2e1 (diff)
patch 8.1.1570: icon signs not displayed properly in the number columnv8.1.1570
Problem: Icon signs not displayed properly in the number column. Solution: Display them properly. (Yegappan Lakshmanan, closes #4559)
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui.c b/src/gui.c
index a4673f0266..5689182277 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -2253,6 +2253,7 @@ gui_outstr_nowrap(
int col = gui.col;
#ifdef FEAT_SIGN_ICONS
int draw_sign = FALSE;
+ char_u extra[18];
# ifdef FEAT_NETBEANS_INTG
int multi_sign = FALSE;
# endif
@@ -2275,10 +2276,17 @@ gui_outstr_nowrap(
multi_sign = TRUE;
# endif
/* draw spaces instead */
- s = (char_u *)" ";
+ if (*curwin->w_p_scl == 'n' && *(curwin->w_p_scl + 1) == 'u' &&
+ (curwin->w_p_nu || curwin->w_p_rnu))
+ {
+ sprintf((char *)extra, "%*c ", number_width(curwin), ' ');
+ s = extra;
+ }
+ else
+ s = (char_u *)" ";
if (len == 1 && col > 0)
--col;
- len = 2;
+ len = (int)STRLEN(s);
draw_sign = TRUE;
highlight_mask = 0;
}