Skip to content

Commit 0231f83

Browse files
committed
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)
1 parent efef9fe commit 0231f83

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/gui.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,7 @@ gui_outstr_nowrap(
22532253
int col = gui.col;
22542254
#ifdef FEAT_SIGN_ICONS
22552255
int draw_sign = FALSE;
2256-
int signcol = col;
2256+
int signcol;
22572257
char_u extra[18];
22582258
# ifdef FEAT_NETBEANS_INTG
22592259
int multi_sign = FALSE;
@@ -2270,7 +2270,7 @@ gui_outstr_nowrap(
22702270
# ifdef FEAT_NETBEANS_INTG
22712271
|| *s == MULTISIGN_BYTE
22722272
# endif
2273-
)
2273+
)
22742274
{
22752275
# ifdef FEAT_NETBEANS_INTG
22762276
if (*s == MULTISIGN_BYTE)
@@ -2289,7 +2289,10 @@ gui_outstr_nowrap(
22892289
--col;
22902290
len = (int)STRLEN(s);
22912291
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;
22932296
draw_sign = TRUE;
22942297
highlight_mask = 0;
22952298
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ static char *(features[]) =
777777

778778
static int included_patches[] =
779779
{ /* Add new patch number below this line */
780+
/**/
781+
1670,
780782
/**/
781783
1669,
782784
/**/

0 commit comments

Comments
 (0)