Mercurial > vim
diff src/gui.c @ 17141:3c0efdd95f8d v8.1.1570
patch 8.1.1570: icon signs not displayed properly in the number column
commit https://github.com/vim/vim/commit/4dff4aed09d2b0d570ca0d19de9cb08bdf03e695
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 19 16:31:28 2019 +0200
patch 8.1.1570: icon signs not displayed properly in the number column
Problem: Icon signs not displayed properly in the number column.
Solution: Display them properly. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4559)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 19 Jun 2019 16:45:05 +0200 |
parents | 5ed4965ebc7b |
children | 210937723567 |
line wrap: on
line diff
--- 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; }