]> granicus.if.org Git - vim/commitdiff
patch 8.1.1670: sign column not always properly aligned v8.1.1670
authorBram Moolenaar <Bram@vim.org>
Fri, 12 Jul 2019 17:22:22 +0000 (19:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 12 Jul 2019 17:22:22 +0000 (19:22 +0200)
Problem:    Sign column not always properly aligned.
Solution:   Use "col" only after it was calculated. (Yee Cheng Chin,
            closes #4649)

src/gui.c
src/version.c

index 5dcab515aefbd09bd4b59d4da991c3fd220d33c6..e66581f52d7ecc889ca772211e2919e723004cb1 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -2253,7 +2253,7 @@ gui_outstr_nowrap(
     int                col = gui.col;
 #ifdef FEAT_SIGN_ICONS
     int                draw_sign = FALSE;
-    int                signcol = col;
+    int                signcol;
     char_u     extra[18];
 # ifdef FEAT_NETBEANS_INTG
     int                multi_sign = FALSE;
@@ -2270,7 +2270,7 @@ gui_outstr_nowrap(
 # ifdef FEAT_NETBEANS_INTG
          || *s == MULTISIGN_BYTE
 # endif
-    )
+       )
     {
 # ifdef FEAT_NETBEANS_INTG
        if (*s == MULTISIGN_BYTE)
@@ -2289,7 +2289,10 @@ gui_outstr_nowrap(
            --col;
        len = (int)STRLEN(s);
        if (len > 2)
-           signcol = col + len - 3;    // Right align sign icon in the number column
+           // right align sign icon in the number column
+           signcol = col + len - 3;
+       else
+           signcol = col;
        draw_sign = TRUE;
        highlight_mask = 0;
     }
index ec0f7a029e177f3c65b9e86946e92e54c2ca7191..b5504b1870a520e0b52d9215f84e866d93f8fd17 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1670,
 /**/
     1669,
 /**/