comparison src/gui.c @ 17342:54fcde87a9eb v8.1.1670

patch 8.1.1670: sign column not always properly aligned commit https://github.com/vim/vim/commit/0231f8312b11a259d9cb550f3318895f6b4d76be Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 12 19:22:22 2019 +0200 patch 8.1.1670: sign column not always properly aligned Problem: Sign column not always properly aligned. Solution: Use "col" only after it was calculated. (Yee Cheng Chin, closes #4649)
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Jul 2019 19:30:04 +0200
parents 16d5e91c5e5b
children df340014f9e4
comparison
equal deleted inserted replaced
17341:634627bf5c95 17342:54fcde87a9eb
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 = col; 2256 int signcol;
2257 char_u extra[18]; 2257 char_u extra[18];
2258 # ifdef FEAT_NETBEANS_INTG 2258 # ifdef FEAT_NETBEANS_INTG
2259 int multi_sign = FALSE; 2259 int multi_sign = FALSE;
2260 # endif 2260 # endif
2261 #endif 2261 #endif
2268 #ifdef FEAT_SIGN_ICONS 2268 #ifdef FEAT_SIGN_ICONS
2269 if (*s == SIGN_BYTE 2269 if (*s == SIGN_BYTE
2270 # ifdef FEAT_NETBEANS_INTG 2270 # ifdef FEAT_NETBEANS_INTG
2271 || *s == MULTISIGN_BYTE 2271 || *s == MULTISIGN_BYTE
2272 # endif 2272 # endif
2273 ) 2273 )
2274 { 2274 {
2275 # ifdef FEAT_NETBEANS_INTG 2275 # ifdef FEAT_NETBEANS_INTG
2276 if (*s == MULTISIGN_BYTE) 2276 if (*s == MULTISIGN_BYTE)
2277 multi_sign = TRUE; 2277 multi_sign = TRUE;
2278 # endif 2278 # endif
2287 s = (char_u *)" "; 2287 s = (char_u *)" ";
2288 if (len == 1 && col > 0) 2288 if (len == 1 && col > 0)
2289 --col; 2289 --col;
2290 len = (int)STRLEN(s); 2290 len = (int)STRLEN(s);
2291 if (len > 2) 2291 if (len > 2)
2292 signcol = col + len - 3; // Right align sign icon in the number column 2292 // right align sign icon in the number column
2293 signcol = col + len - 3;
2294 else
2295 signcol = col;
2293 draw_sign = TRUE; 2296 draw_sign = TRUE;
2294 highlight_mask = 0; 2297 highlight_mask = 0;
2295 } 2298 }
2296 else 2299 else
2297 #endif 2300 #endif