Karsten Hopp f93f70
To: vim_dev@googlegroups.com
Karsten Hopp f93f70
Subject: Patch 7.4.664
Karsten Hopp f93f70
Fcc: outbox
Karsten Hopp f93f70
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f93f70
Mime-Version: 1.0
Karsten Hopp f93f70
Content-Type: text/plain; charset=UTF-8
Karsten Hopp f93f70
Content-Transfer-Encoding: 8bit
Karsten Hopp f93f70
------------
Karsten Hopp f93f70
Karsten Hopp f93f70
Patch 7.4.664
Karsten Hopp f93f70
Problem:    When 'compatible' is reset 'numberwidth' is set to 4, but the
Karsten Hopp f93f70
	    effect doesn't show until a change is made.
Karsten Hopp f93f70
Solution:   Check if 'numberwidth' changed. (Christian Brabandt)
Karsten Hopp f93f70
Files:	    src/screen.c, src/structs.h
Karsten Hopp f93f70
Karsten Hopp f93f70
Karsten Hopp f93f70
*** ../vim-7.4.663/src/screen.c	2015-02-17 17:26:04.561123749 +0100
Karsten Hopp f93f70
--- src/screen.c	2015-03-20 15:36:11.284395407 +0100
Karsten Hopp f93f70
***************
Karsten Hopp f93f70
*** 10718,10724 ****
Karsten Hopp f93f70
  	/* cursor line shows absolute line number */
Karsten Hopp f93f70
  	lnum = wp->w_buffer->b_ml.ml_line_count;
Karsten Hopp f93f70
  
Karsten Hopp f93f70
!     if (lnum == wp->w_nrwidth_line_count)
Karsten Hopp f93f70
  	return wp->w_nrwidth_width;
Karsten Hopp f93f70
      wp->w_nrwidth_line_count = lnum;
Karsten Hopp f93f70
  
Karsten Hopp f93f70
--- 10718,10724 ----
Karsten Hopp f93f70
  	/* cursor line shows absolute line number */
Karsten Hopp f93f70
  	lnum = wp->w_buffer->b_ml.ml_line_count;
Karsten Hopp f93f70
  
Karsten Hopp f93f70
!     if (lnum == wp->w_nrwidth_line_count && wp->w_nuw_cached == wp->w_p_nuw)
Karsten Hopp f93f70
  	return wp->w_nrwidth_width;
Karsten Hopp f93f70
      wp->w_nrwidth_line_count = lnum;
Karsten Hopp f93f70
  
Karsten Hopp f93f70
***************
Karsten Hopp f93f70
*** 10734,10739 ****
Karsten Hopp f93f70
--- 10734,10740 ----
Karsten Hopp f93f70
  	n = wp->w_p_nuw - 1;
Karsten Hopp f93f70
  
Karsten Hopp f93f70
      wp->w_nrwidth_width = n;
Karsten Hopp f93f70
+     wp->w_nuw_cached = wp->w_p_nuw;
Karsten Hopp f93f70
      return n;
Karsten Hopp f93f70
  }
Karsten Hopp f93f70
  #endif
Karsten Hopp f93f70
*** ../vim-7.4.663/src/structs.h	2015-02-03 12:55:11.140179551 +0100
Karsten Hopp f93f70
--- src/structs.h	2015-03-20 15:36:11.284395407 +0100
Karsten Hopp f93f70
***************
Karsten Hopp f93f70
*** 2306,2311 ****
Karsten Hopp f93f70
--- 2306,2312 ----
Karsten Hopp f93f70
  #ifdef FEAT_LINEBREAK
Karsten Hopp f93f70
      linenr_T	w_nrwidth_line_count;	/* line count when ml_nrwidth_width
Karsten Hopp f93f70
  					 * was computed. */
Karsten Hopp f93f70
+     long	w_nuw_cached;		/* 'numberwidth' option cached */
Karsten Hopp f93f70
      int		w_nrwidth_width;	/* nr of chars to print line count. */
Karsten Hopp f93f70
  #endif
Karsten Hopp f93f70
  
Karsten Hopp f93f70
*** ../vim-7.4.663/src/version.c	2015-03-14 15:35:45.664866097 +0100
Karsten Hopp f93f70
--- src/version.c	2015-03-20 15:37:35.279447275 +0100
Karsten Hopp f93f70
***************
Karsten Hopp f93f70
*** 743,744 ****
Karsten Hopp f93f70
--- 743,746 ----
Karsten Hopp f93f70
  {   /* Add new patch number below this line */
Karsten Hopp f93f70
+ /**/
Karsten Hopp f93f70
+     664,
Karsten Hopp f93f70
  /**/
Karsten Hopp f93f70
Karsten Hopp f93f70
-- 
Karsten Hopp f93f70
Windows
Karsten Hopp f93f70
M!uqoms
Karsten Hopp f93f70
Karsten Hopp f93f70
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f93f70
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f93f70
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp f93f70
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///