comparison src/gui.c @ 17176:210937723567 v8.1.1587

patch 8.1.1587: redraw problem when sign icons in the number column commit https://github.com/vim/vim/commit/2b044ffb5ada77e6fa89779d6532ea9fae3fe029 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 24 05:45:14 2019 +0200 patch 8.1.1587: redraw problem when sign icons in the number column 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)
author Bram Moolenaar <Bram@vim.org>
date Mon, 24 Jun 2019 06:00:06 +0200
parents 3c0efdd95f8d
children 9ca8baed6b90
comparison
equal deleted inserted replaced
17175:e254d1329e65 17176:210937723567
2251 attrentry_T *aep = NULL; 2251 attrentry_T *aep = NULL;
2252 int draw_flags; 2252 int draw_flags;
2253 int col = gui.col; 2253 int col = gui.col;
2254 #ifdef FEAT_SIGN_ICONS 2254 #ifdef FEAT_SIGN_ICONS
2255 int draw_sign = FALSE; 2255 int draw_sign = FALSE;
2256 int signcol = 0;
2256 char_u extra[18]; 2257 char_u extra[18];
2257 # ifdef FEAT_NETBEANS_INTG 2258 # ifdef FEAT_NETBEANS_INTG
2258 int multi_sign = FALSE; 2259 int multi_sign = FALSE;
2259 # endif 2260 # endif
2260 #endif 2261 #endif
2285 else 2286 else
2286 s = (char_u *)" "; 2287 s = (char_u *)" ";
2287 if (len == 1 && col > 0) 2288 if (len == 1 && col > 0)
2288 --col; 2289 --col;
2289 len = (int)STRLEN(s); 2290 len = (int)STRLEN(s);
2291 if (len > 2)
2292 signcol = len - 3; // Right align sign icon in the number column
2290 draw_sign = TRUE; 2293 draw_sign = TRUE;
2291 highlight_mask = 0; 2294 highlight_mask = 0;
2292 } 2295 }
2293 else 2296 else
2294 #endif 2297 #endif
2610 } 2613 }
2611 2614
2612 #ifdef FEAT_SIGN_ICONS 2615 #ifdef FEAT_SIGN_ICONS
2613 if (draw_sign) 2616 if (draw_sign)
2614 /* Draw the sign on top of the spaces. */ 2617 /* Draw the sign on top of the spaces. */
2615 gui_mch_drawsign(gui.row, col, gui.highlight_mask); 2618 gui_mch_drawsign(gui.row, signcol, gui.highlight_mask);
2616 # if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \ 2619 # if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \
2617 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)) 2620 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN))
2618 if (multi_sign) 2621 if (multi_sign)
2619 netbeans_draw_multisign_indicator(gui.row); 2622 netbeans_draw_multisign_indicator(gui.row);
2620 # endif 2623 # endif