81c2858
To: vim-dev@vim.org
81c2858
Subject: Patch 7.2.242
81c2858
Fcc: outbox
81c2858
From: Bram Moolenaar <Bram@moolenaar.net>
81c2858
Mime-Version: 1.0
81c2858
Content-Type: text/plain; charset=UTF-8
81c2858
Content-Transfer-Encoding: 8bit
81c2858
------------
81c2858
81c2858
Patch 7.2.242
81c2858
Problem:    Setting 'lazyredraw' causes the cursor column to be recomputed.
81c2858
	    (Tom Link)
81c2858
Solution:   Only recompute the cursor column for a boolean option if changes
81c2858
	    the cursor position.
81c2858
Files:	    src/option.c
81c2858
81c2858
81c2858
*** ../vim-7.2.241/src/option.c	2009-07-22 14:27:33.000000000 +0200
81c2858
--- src/option.c	2009-07-29 10:03:39.000000000 +0200
81c2858
***************
81c2858
*** 7194,7199 ****
81c2858
--- 7194,7207 ----
81c2858
  	compatible_set();
81c2858
      }
81c2858
  
81c2858
+     /* 'list', 'number' */
81c2858
+     else if ((int *)varp == &curwin->w_p_list
81c2858
+ 	  || (int *)varp == &curwin->w_p_nu)
81c2858
+     {
81c2858
+ 	if (curwin->w_curswant != MAXCOL)
81c2858
+ 	    curwin->w_set_curswant = TRUE;
81c2858
+     }
81c2858
+ 
81c2858
      else if ((int *)varp == &curbuf->b_p_ro)
81c2858
      {
81c2858
  	/* when 'readonly' is reset globally, also reset readonlymode */
81c2858
***************
81c2858
*** 7645,7650 ****
81c2858
--- 7653,7666 ----
81c2858
  	    curbuf->b_p_imsearch = B_IMODE_USE_INSERT;
81c2858
  # endif
81c2858
  	}
81c2858
+ 	if (curwin->w_curswant != MAXCOL)
81c2858
+ 	    curwin->w_set_curswant = TRUE;
81c2858
+     }
81c2858
+ 
81c2858
+     else if ((int *)varp == &p_arshape)
81c2858
+     {
81c2858
+ 	if (curwin->w_curswant != MAXCOL)
81c2858
+ 	    curwin->w_set_curswant = TRUE;
81c2858
      }
81c2858
  #endif
81c2858
  
81c2858
***************
81c2858
*** 7655,7662 ****
81c2858
      options[opt_idx].flags |= P_WAS_SET;
81c2858
  
81c2858
      comp_col();			    /* in case 'ruler' or 'showcmd' changed */
81c2858
!     if (curwin->w_curswant != MAXCOL)
81c2858
! 	curwin->w_set_curswant = TRUE;  /* in case 'list' changed */
81c2858
      check_redraw(options[opt_idx].flags);
81c2858
  
81c2858
      return NULL;
81c2858
--- 7671,7677 ----
81c2858
      options[opt_idx].flags |= P_WAS_SET;
81c2858
  
81c2858
      comp_col();			    /* in case 'ruler' or 'showcmd' changed */
81c2858
! 
81c2858
      check_redraw(options[opt_idx].flags);
81c2858
  
81c2858
      return NULL;
81c2858
*** ../vim-7.2.241/src/version.c	2009-07-29 12:09:49.000000000 +0200
81c2858
--- src/version.c	2009-07-29 15:40:43.000000000 +0200
81c2858
***************
81c2858
*** 678,679 ****
81c2858
--- 678,681 ----
81c2858
  {   /* Add new patch number below this line */
81c2858
+ /**/
81c2858
+     242,
81c2858
  /**/
81c2858
81c2858
-- 
81c2858
hundred-and-one symptoms of being an internet addict:
81c2858
117. You are more comfortable typing in html.
81c2858
81c2858
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
81c2858
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81c2858
\\\        download, build and distribute -- http://www.A-A-P.org        ///
81c2858
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///