forked from aniani/vim
updated for version 7.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)
This commit is contained in:
@@ -10718,7 +10718,7 @@ number_width(wp)
|
|||||||
/* cursor line shows absolute line number */
|
/* cursor line shows absolute line number */
|
||||||
lnum = wp->w_buffer->b_ml.ml_line_count;
|
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;
|
return wp->w_nrwidth_width;
|
||||||
wp->w_nrwidth_line_count = lnum;
|
wp->w_nrwidth_line_count = lnum;
|
||||||
|
|
||||||
@@ -10734,6 +10734,7 @@ number_width(wp)
|
|||||||
n = wp->w_p_nuw - 1;
|
n = wp->w_p_nuw - 1;
|
||||||
|
|
||||||
wp->w_nrwidth_width = n;
|
wp->w_nrwidth_width = n;
|
||||||
|
wp->w_nuw_cached = wp->w_p_nuw;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2306,6 +2306,7 @@ struct window_S
|
|||||||
#ifdef FEAT_LINEBREAK
|
#ifdef FEAT_LINEBREAK
|
||||||
linenr_T w_nrwidth_line_count; /* line count when ml_nrwidth_width
|
linenr_T w_nrwidth_line_count; /* line count when ml_nrwidth_width
|
||||||
* was computed. */
|
* was computed. */
|
||||||
|
long w_nuw_cached; /* 'numberwidth' option cached */
|
||||||
int w_nrwidth_width; /* nr of chars to print line count. */
|
int w_nrwidth_width; /* nr of chars to print line count. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
664,
|
||||||
/**/
|
/**/
|
||||||
663,
|
663,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user