summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-03-20 15:42:10 +0100
committerBram Moolenaar <Bram@vim.org>2015-03-20 15:42:10 +0100
commit6b31467aa7f304a80343216c11a1588dff361229 (patch)
tree5b9962c642e820e41c6b4c133e4e06c9e5542b0c
parent404c942fb85c390f4b73c1733088871b0b0d7964 (diff)
updated for version 7.4.664v7.4.664
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)
-rw-r--r--src/screen.c3
-rw-r--r--src/structs.h1
-rw-r--r--src/version.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index 6816503871..1d4fdd3d95 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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
diff --git a/src/structs.h b/src/structs.h
index 60bc870eb3..448697a4a6 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -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
diff --git a/src/version.c b/src/version.c
index 8a55ed6158..265145a4ac 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 664,
+/**/
663,
/**/
662,