]> granicus.if.org Git - vim/commitdiff
patch 8.1.1643: sign placement is wrong when 'foldcolumn' is set v8.1.1643
authorBram Moolenaar <Bram@vim.org>
Sun, 7 Jul 2019 12:56:25 +0000 (14:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 7 Jul 2019 12:56:25 +0000 (14:56 +0200)
Problem:    Sign placement is wrong when 'foldcolumn' is set.
Solution:   Adjust the column computation. (Yee Cheng Chin, closes #4627)

src/gui.c
src/version.c

index 634f3fbc54bb4d55c9813575a42e3b0f613daf45..7c378c6fe16e74d93f4015867faa6cc75cfdbb2c 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 = 0;
+    int                signcol = col;
     char_u     extra[18];
 # ifdef FEAT_NETBEANS_INTG
     int                multi_sign = FALSE;
@@ -2289,7 +2289,7 @@ gui_outstr_nowrap(
            --col;
        len = (int)STRLEN(s);
        if (len > 2)
-           signcol = len - 3;  // Right align sign icon in the number column
+           signcol = col + len - 3;    // Right align sign icon in the number column
        draw_sign = TRUE;
        highlight_mask = 0;
     }
index f71c75c76070e44578e1cd1a1174c0be3ba987b7..c7e2a1633a3f0c7d9f043d89eefeef927a95fda1 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1643,
 /**/
     1642,
 /**/