]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.664 v7.4.664
authorBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 14:42:10 +0000 (15:42 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 14:42:10 +0000 (15:42 +0100)
Problem:    When 'compatible' is reset 'numberwidth' is set to 4, but the
            effect doesn't show until a change is made.
Solution:   Check if 'numberwidth' changed. (Christian Brabandt)

src/screen.c
src/structs.h
src/version.c

index 6816503871140477b04e506de4d90c4bebbbd8a7..1d4fdd3d95539098b63ec3011099b3ee2f133208 100644 (file)
@@ -10718,7 +10718,7 @@ number_width(wp)
        /* cursor line shows absolute line number */
        lnum = wp->w_buffer->b_ml.ml_line_count;
 
-    if (lnum == wp->w_nrwidth_line_count)
+    if (lnum == wp->w_nrwidth_line_count && wp->w_nuw_cached == wp->w_p_nuw)
        return wp->w_nrwidth_width;
     wp->w_nrwidth_line_count = lnum;
 
@@ -10734,6 +10734,7 @@ number_width(wp)
        n = wp->w_p_nuw - 1;
 
     wp->w_nrwidth_width = n;
+    wp->w_nuw_cached = wp->w_p_nuw;
     return n;
 }
 #endif
index 60bc870eb3e65539dd59f5212663b26296ecb8cb..448697a4a6a610ea216ec5768923bae77e0f59e5 100644 (file)
@@ -2306,6 +2306,7 @@ struct window_S
 #ifdef FEAT_LINEBREAK
     linenr_T   w_nrwidth_line_count;   /* line count when ml_nrwidth_width
                                         * was computed. */
+    long       w_nuw_cached;           /* 'numberwidth' option cached */
     int                w_nrwidth_width;        /* nr of chars to print line count. */
 #endif
 
index 8a55ed6158dee0efe13c159c30657b3ca55859a2..265145a4ac2284e29dd966a2bb6493aecb08b01a 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    664,
 /**/
     663,
 /**/