summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-24 05:45:14 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-24 05:45:14 +0200
commit2b044ffb5ada77e6fa89779d6532ea9fae3fe029 (patch)
treecc163bbec466fe54c7ac6c0b4a341519457758bd /src/gui.c
parentb2cda0dd1d9c9e47e21c59b8d40845210ab83f69 (diff)
patch 8.1.1587: redraw problem when sign icons in the number columnv8.1.1587
Problem: Redraw problem when sign icons in the number column. Solution: Clear and redraw when changing related options. Right aligh the sign icon in the GUI. (Yegappan Lakshmanan, closes #4578)
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui.c b/src/gui.c
index 5689182277..634f3fbc54 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;
+ int signcol = 0;
char_u extra[18];
# ifdef FEAT_NETBEANS_INTG
int multi_sign = FALSE;
@@ -2287,6 +2288,8 @@ gui_outstr_nowrap(
if (len == 1 && col > 0)
--col;
len = (int)STRLEN(s);
+ if (len > 2)
+ signcol = len - 3; // Right align sign icon in the number column
draw_sign = TRUE;
highlight_mask = 0;
}
@@ -2612,7 +2615,7 @@ gui_outstr_nowrap(
#ifdef FEAT_SIGN_ICONS
if (draw_sign)
/* Draw the sign on top of the spaces. */
- gui_mch_drawsign(gui.row, col, gui.highlight_mask);
+ gui_mch_drawsign(gui.row, signcol, gui.highlight_mask);
# if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN))
if (multi_sign)