Karsten Hopp 235c0c
To: vim_dev@googlegroups.com
Karsten Hopp 235c0c
Subject: Patch 7.3.487
Karsten Hopp 235c0c
Fcc: outbox
Karsten Hopp 235c0c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 235c0c
Mime-Version: 1.0
Karsten Hopp 235c0c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 235c0c
Content-Transfer-Encoding: 8bit
Karsten Hopp 235c0c
------------
Karsten Hopp 235c0c
Karsten Hopp 235c0c
Patch 7.3.487
Karsten Hopp 235c0c
Problem:    When setting 'timeoutlen' or 'ttimeoutlen' the column for vertical
Karsten Hopp 235c0c
	    movement is reset unnecessarily.
Karsten Hopp 235c0c
Solution:   Do not set w_set_curswant for every option. Add a test for this.
Karsten Hopp 235c0c
	    (Kana Natsuno) Add the P_CURSWANT flag for options.
Karsten Hopp 235c0c
Files:	    src/option.c, src/testdir/test84.in, src/testdir/test84.ok,
Karsten Hopp 235c0c
	    src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
Karsten Hopp 235c0c
	    src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
Karsten Hopp 235c0c
	    src/testdir/Make_vms.mms, src/testdir/Makefile
Karsten Hopp 235c0c
Karsten Hopp 235c0c
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/option.c	2012-03-23 16:25:13.000000000 +0100
Karsten Hopp 235c0c
--- src/option.c	2012-03-28 19:57:46.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 433,449 ****
Karsten Hopp 235c0c
  #define P_RCLR		0x7000	/* clear and redraw all */
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  #define P_COMMA		0x8000	/* comma separated list */
Karsten Hopp 235c0c
! #define P_NODUP		0x10000L/* don't allow duplicate strings */
Karsten Hopp 235c0c
! #define P_FLAGLIST	0x20000L/* list of single-char flags */
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
! #define P_SECURE	0x40000L/* cannot change in modeline or secure mode */
Karsten Hopp 235c0c
! #define P_GETTEXT	0x80000L/* expand default value with _() */
Karsten Hopp 235c0c
! #define P_NOGLOB       0x100000L/* do not use local value for global vimrc */
Karsten Hopp 235c0c
! #define P_NFNAME       0x200000L/* only normal file name chars allowed */
Karsten Hopp 235c0c
! #define P_INSECURE     0x400000L/* option was set from a modeline */
Karsten Hopp 235c0c
! #define P_PRI_MKRC     0x800000L/* priority for :mkvimrc (setting option has
Karsten Hopp 235c0c
  				   side effects) */
Karsten Hopp 235c0c
! #define P_NO_ML       0x1000000L/* not allowed in modeline */
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  #define ISK_LATIN1  (char_u *)"@,48-57,_,192-255"
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
--- 433,451 ----
Karsten Hopp 235c0c
  #define P_RCLR		0x7000	/* clear and redraw all */
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  #define P_COMMA		0x8000	/* comma separated list */
Karsten Hopp 235c0c
! #define P_NODUP		0x10000L /* don't allow duplicate strings */
Karsten Hopp 235c0c
! #define P_FLAGLIST	0x20000L /* list of single-char flags */
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
! #define P_SECURE	0x40000L /* cannot change in modeline or secure mode */
Karsten Hopp 235c0c
! #define P_GETTEXT	0x80000L /* expand default value with _() */
Karsten Hopp 235c0c
! #define P_NOGLOB       0x100000L /* do not use local value for global vimrc */
Karsten Hopp 235c0c
! #define P_NFNAME       0x200000L /* only normal file name chars allowed */
Karsten Hopp 235c0c
! #define P_INSECURE     0x400000L /* option was set from a modeline */
Karsten Hopp 235c0c
! #define P_PRI_MKRC     0x800000L /* priority for :mkvimrc (setting option has
Karsten Hopp 235c0c
  				   side effects) */
Karsten Hopp 235c0c
! #define P_NO_ML       0x1000000L /* not allowed in modeline */
Karsten Hopp 235c0c
! #define P_CURSWANT    0x2000000L /* update curswant required; not needed when
Karsten Hopp 235c0c
! 				  * there is a redraw flag */
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  #define ISK_LATIN1  (char_u *)"@,48-57,_,192-255"
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 479,485 ****
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  	options[] =
Karsten Hopp 235c0c
  {
Karsten Hopp 235c0c
!     {"aleph",	    "al",   P_NUM|P_VI_DEF,
Karsten Hopp 235c0c
  #ifdef FEAT_RIGHTLEFT
Karsten Hopp 235c0c
  			    (char_u *)&p_aleph, PV_NONE,
Karsten Hopp 235c0c
  #else
Karsten Hopp 235c0c
--- 481,487 ----
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  	options[] =
Karsten Hopp 235c0c
  {
Karsten Hopp 235c0c
!     {"aleph",	    "al",   P_NUM|P_VI_DEF|P_CURSWANT,
Karsten Hopp 235c0c
  #ifdef FEAT_RIGHTLEFT
Karsten Hopp 235c0c
  			    (char_u *)&p_aleph, PV_NONE,
Karsten Hopp 235c0c
  #else
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 501,507 ****
Karsten Hopp 235c0c
  			    {(char_u *)FALSE, (char_u *)FALSE}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"arabic",	    "arab", P_BOOL|P_VI_DEF|P_VIM,
Karsten Hopp 235c0c
  #ifdef FEAT_ARABIC
Karsten Hopp 235c0c
  			    (char_u *)VAR_WIN, PV_ARAB,
Karsten Hopp 235c0c
  #else
Karsten Hopp 235c0c
--- 503,509 ----
Karsten Hopp 235c0c
  			    {(char_u *)FALSE, (char_u *)FALSE}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"arabic",	    "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT,
Karsten Hopp 235c0c
  #ifdef FEAT_ARABIC
Karsten Hopp 235c0c
  			    (char_u *)VAR_WIN, PV_ARAB,
Karsten Hopp 235c0c
  #else
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 778,784 ****
Karsten Hopp 235c0c
      {"columns",	    "co",   P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
Karsten Hopp 235c0c
  			    (char_u *)&Columns, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"comments",    "com",  P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
Karsten Hopp 235c0c
  #ifdef FEAT_COMMENTS
Karsten Hopp 235c0c
  			    (char_u *)&p_com, PV_COM,
Karsten Hopp 235c0c
  			    {(char_u *)"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-",
Karsten Hopp 235c0c
--- 780,786 ----
Karsten Hopp 235c0c
      {"columns",	    "co",   P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
Karsten Hopp 235c0c
  			    (char_u *)&Columns, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"comments",    "com",  P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP|P_CURSWANT,
Karsten Hopp 235c0c
  #ifdef FEAT_COMMENTS
Karsten Hopp 235c0c
  			    (char_u *)&p_com, PV_COM,
Karsten Hopp 235c0c
  			    {(char_u *)"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-",
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 788,794 ****
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF,
Karsten Hopp 235c0c
  #ifdef FEAT_FOLDING
Karsten Hopp 235c0c
  			    (char_u *)&p_cms, PV_CMS,
Karsten Hopp 235c0c
  			    {(char_u *)"/*%s*/", (char_u *)0L}
Karsten Hopp 235c0c
--- 790,796 ----
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
Karsten Hopp 235c0c
  #ifdef FEAT_FOLDING
Karsten Hopp 235c0c
  			    (char_u *)&p_cms, PV_CMS,
Karsten Hopp 235c0c
  			    {(char_u *)"/*%s*/", (char_u *)0L}
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 953,959 ****
Karsten Hopp 235c0c
      {"debug",	    NULL,   P_STRING|P_VI_DEF,
Karsten Hopp 235c0c
  			    (char_u *)&p_debug, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"define",	    "def",  P_STRING|P_ALLOCED|P_VI_DEF,
Karsten Hopp 235c0c
  #ifdef FEAT_FIND_ID
Karsten Hopp 235c0c
  			    (char_u *)&p_def, PV_DEF,
Karsten Hopp 235c0c
  			    {(char_u *)"^\\s*#\\s*define", (char_u *)0L}
Karsten Hopp 235c0c
--- 955,961 ----
Karsten Hopp 235c0c
      {"debug",	    NULL,   P_STRING|P_VI_DEF,
Karsten Hopp 235c0c
  			    (char_u *)&p_debug, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"define",	    "def",  P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
Karsten Hopp 235c0c
  #ifdef FEAT_FIND_ID
Karsten Hopp 235c0c
  			    (char_u *)&p_def, PV_DEF,
Karsten Hopp 235c0c
  			    {(char_u *)"^\\s*#\\s*define", (char_u *)0L}
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 983,989 ****
Karsten Hopp 235c0c
  			    (char_u *)NULL, PV_NONE,
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"diffexpr",    "dex",  P_STRING|P_VI_DEF|P_SECURE,
Karsten Hopp 235c0c
  #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
Karsten Hopp 235c0c
  			    (char_u *)&p_dex, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)"", (char_u *)0L}
Karsten Hopp 235c0c
--- 985,991 ----
Karsten Hopp 235c0c
  			    (char_u *)NULL, PV_NONE,
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"diffexpr",    "dex",  P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT,
Karsten Hopp 235c0c
  #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
Karsten Hopp 235c0c
  			    (char_u *)&p_dex, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)"", (char_u *)0L}
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 1099,1105 ****
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"fileformat",  "ff",   P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC,
Karsten Hopp 235c0c
  			    (char_u *)&p_ff, PV_FF,
Karsten Hopp 235c0c
  			    {(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
      {"fileformats", "ffs",  P_STRING|P_VIM|P_COMMA|P_NODUP,
Karsten Hopp 235c0c
--- 1101,1107 ----
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"fileformat",  "ff",   P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC|P_CURSWANT,
Karsten Hopp 235c0c
  			    (char_u *)&p_ff, PV_FF,
Karsten Hopp 235c0c
  			    {(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
      {"fileformats", "ffs",  P_STRING|P_VIM|P_COMMA|P_NODUP,
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 1159,1165 ****
Karsten Hopp 235c0c
      {"foldlevel",   "fdl",  P_NUM|P_VI_DEF|P_RWIN,
Karsten Hopp 235c0c
  			    (char_u *)VAR_WIN, PV_FDL,
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"foldlevelstart","fdls", P_NUM|P_VI_DEF,
Karsten Hopp 235c0c
  			    (char_u *)&p_fdls, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
      {"foldmarker",  "fmr",  P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
Karsten Hopp 235c0c
--- 1161,1167 ----
Karsten Hopp 235c0c
      {"foldlevel",   "fdl",  P_NUM|P_VI_DEF|P_RWIN,
Karsten Hopp 235c0c
  			    (char_u *)VAR_WIN, PV_FDL,
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT,
Karsten Hopp 235c0c
  			    (char_u *)&p_fdls, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
      {"foldmarker",  "fmr",  P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 1176,1182 ****
Karsten Hopp 235c0c
      {"foldnestmax", "fdn",  P_NUM|P_VI_DEF|P_RWIN,
Karsten Hopp 235c0c
  			    (char_u *)VAR_WIN, PV_FDN,
Karsten Hopp 235c0c
  			    {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"foldopen",    "fdo",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
Karsten Hopp 235c0c
  			    (char_u *)&p_fdo, PV_NONE,
Karsten Hopp 235c0c
  		 {(char_u *)"block,hor,mark,percent,quickfix,search,tag,undo",
Karsten Hopp 235c0c
  						 (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
--- 1178,1184 ----
Karsten Hopp 235c0c
      {"foldnestmax", "fdn",  P_NUM|P_VI_DEF|P_RWIN,
Karsten Hopp 235c0c
  			    (char_u *)VAR_WIN, PV_FDN,
Karsten Hopp 235c0c
  			    {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"foldopen",    "fdo",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_CURSWANT,
Karsten Hopp 235c0c
  			    (char_u *)&p_fdo, PV_NONE,
Karsten Hopp 235c0c
  		 {(char_u *)"block,hor,mark,percent,quickfix,search,tag,undo",
Karsten Hopp 235c0c
  						 (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 1741,1747 ****
Karsten Hopp 235c0c
      {"matchtime",   "mat",  P_NUM|P_VI_DEF,
Karsten Hopp 235c0c
  			    (char_u *)&p_mat, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"maxcombine",  "mco",  P_NUM|P_VI_DEF,
Karsten Hopp 235c0c
  #ifdef FEAT_MBYTE
Karsten Hopp 235c0c
  			    (char_u *)&p_mco, PV_NONE,
Karsten Hopp 235c0c
  #else
Karsten Hopp 235c0c
--- 1743,1749 ----
Karsten Hopp 235c0c
      {"matchtime",   "mat",  P_NUM|P_VI_DEF,
Karsten Hopp 235c0c
  			    (char_u *)&p_mat, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"maxcombine",  "mco",  P_NUM|P_VI_DEF|P_CURSWANT,
Karsten Hopp 235c0c
  #ifdef FEAT_MBYTE
Karsten Hopp 235c0c
  			    (char_u *)&p_mco, PV_NONE,
Karsten Hopp 235c0c
  #else
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 2710,2716 ****
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"virtualedit", "ve",   P_STRING|P_COMMA|P_NODUP|P_VI_DEF|P_VIM,
Karsten Hopp 235c0c
  #ifdef FEAT_VIRTUALEDIT
Karsten Hopp 235c0c
  			    (char_u *)&p_ve, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)"", (char_u *)""}
Karsten Hopp 235c0c
--- 2712,2718 ----
Karsten Hopp 235c0c
  			    {(char_u *)0L, (char_u *)0L}
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  			    SCRIPTID_INIT},
Karsten Hopp 235c0c
!     {"virtualedit", "ve",   P_STRING|P_COMMA|P_NODUP|P_VI_DEF|P_VIM|P_CURSWANT,
Karsten Hopp 235c0c
  #ifdef FEAT_VIRTUALEDIT
Karsten Hopp 235c0c
  			    (char_u *)&p_ve, PV_NONE,
Karsten Hopp 235c0c
  			    {(char_u *)"", (char_u *)""}
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 7064,7071 ****
Karsten Hopp 235c0c
      }
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
!     if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
! 	curwin->w_set_curswant = TRUE;  /* in case 'showbreak' changed */
Karsten Hopp 235c0c
  #ifdef FEAT_GUI
Karsten Hopp 235c0c
      /* check redraw when it's not a GUI option or the GUI is active. */
Karsten Hopp 235c0c
      if (!redraw_gui_only || gui.in_use)
Karsten Hopp 235c0c
--- 7066,7075 ----
Karsten Hopp 235c0c
      }
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
!     if (curwin->w_curswant != MAXCOL
Karsten Hopp 235c0c
! 		     && (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
Karsten Hopp 235c0c
! 	curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
! 
Karsten Hopp 235c0c
  #ifdef FEAT_GUI
Karsten Hopp 235c0c
      /* check redraw when it's not a GUI option or the GUI is active. */
Karsten Hopp 235c0c
      if (!redraw_gui_only || gui.in_use)
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 7587,7595 ****
Karsten Hopp 235c0c
  	  || (int *)varp == &curwin->w_p_nu
Karsten Hopp 235c0c
  	  || (int *)varp == &curwin->w_p_rnu)
Karsten Hopp 235c0c
      {
Karsten Hopp 235c0c
- 	if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
- 	    curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
- 
Karsten Hopp 235c0c
  	/* If 'number' is set, reset 'relativenumber'. */
Karsten Hopp 235c0c
  	/* If 'relativenumber' is set, reset 'number'. */
Karsten Hopp 235c0c
  	if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu)
Karsten Hopp 235c0c
--- 7591,7596 ----
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 7834,7841 ****
Karsten Hopp 235c0c
      {
Karsten Hopp 235c0c
  	if (curwin->w_p_wrap)
Karsten Hopp 235c0c
  	    curwin->w_leftcol = 0;
Karsten Hopp 235c0c
- 	if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
- 	    curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
      }
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  #ifdef FEAT_WINDOWS
Karsten Hopp 235c0c
--- 7835,7840 ----
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 8062,8092 ****
Karsten Hopp 235c0c
  	    curbuf->b_p_imsearch = B_IMODE_USE_INSERT;
Karsten Hopp 235c0c
  # endif
Karsten Hopp 235c0c
  	}
Karsten Hopp 235c0c
- 	if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
- 	    curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
      }
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
-     else if ((int *)varp == &p_arshape)
Karsten Hopp 235c0c
-     {
Karsten Hopp 235c0c
- 	if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
- 	    curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
-     }
Karsten Hopp 235c0c
- #endif
Karsten Hopp 235c0c
- 
Karsten Hopp 235c0c
- #ifdef FEAT_LINEBREAK
Karsten Hopp 235c0c
-     if ((int *)varp == &curwin->w_p_lbr)
Karsten Hopp 235c0c
-     {
Karsten Hopp 235c0c
- 	if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
- 	    curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
-     }
Karsten Hopp 235c0c
- #endif
Karsten Hopp 235c0c
- 
Karsten Hopp 235c0c
- #ifdef FEAT_RIGHTLEFT
Karsten Hopp 235c0c
-     if ((int *)varp == &curwin->w_p_rl)
Karsten Hopp 235c0c
-     {
Karsten Hopp 235c0c
- 	if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
- 	    curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
-     }
Karsten Hopp 235c0c
  #endif
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      /*
Karsten Hopp 235c0c
--- 8061,8068 ----
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 8096,8102 ****
Karsten Hopp 235c0c
      options[opt_idx].flags |= P_WAS_SET;
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      comp_col();			    /* in case 'ruler' or 'showcmd' changed */
Karsten Hopp 235c0c
! 
Karsten Hopp 235c0c
      check_redraw(options[opt_idx].flags);
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      return NULL;
Karsten Hopp 235c0c
--- 8072,8080 ----
Karsten Hopp 235c0c
      options[opt_idx].flags |= P_WAS_SET;
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      comp_col();			    /* in case 'ruler' or 'showcmd' changed */
Karsten Hopp 235c0c
!     if (curwin->w_curswant != MAXCOL
Karsten Hopp 235c0c
! 		     && (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
Karsten Hopp 235c0c
! 	curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
      check_redraw(options[opt_idx].flags);
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      return NULL;
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 8611,8618 ****
Karsten Hopp 235c0c
      options[opt_idx].flags |= P_WAS_SET;
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      comp_col();			    /* in case 'columns' or 'ls' changed */
Karsten Hopp 235c0c
!     if (curwin->w_curswant != MAXCOL)
Karsten Hopp 235c0c
! 	curwin->w_set_curswant = TRUE;  /* in case 'tabstop' changed */
Karsten Hopp 235c0c
      check_redraw(options[opt_idx].flags);
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      return errmsg;
Karsten Hopp 235c0c
--- 8589,8597 ----
Karsten Hopp 235c0c
      options[opt_idx].flags |= P_WAS_SET;
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      comp_col();			    /* in case 'columns' or 'ls' changed */
Karsten Hopp 235c0c
!     if (curwin->w_curswant != MAXCOL
Karsten Hopp 235c0c
! 		     && (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
Karsten Hopp 235c0c
! 	curwin->w_set_curswant = TRUE;
Karsten Hopp 235c0c
      check_redraw(options[opt_idx].flags);
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
      return errmsg;
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/test84.in	2012-03-28 19:55:12.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/test84.in	2012-03-28 19:46:53.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 0 ****
Karsten Hopp 235c0c
--- 1,35 ----
Karsten Hopp 235c0c
+ Tests for curswant not changing when setting an option
Karsten Hopp 235c0c
+ 
Karsten Hopp 235c0c
+ STARTTEST
Karsten Hopp 235c0c
+ :so small.vim
Karsten Hopp 235c0c
+ :/^start target options$/+1,/^end target options$/-1 yank
Karsten Hopp 235c0c
+ :let target_option_names = split(@0)
Karsten Hopp 235c0c
+ :function TestCurswant(option_name)
Karsten Hopp 235c0c
+ :  normal! ggf8j
Karsten Hopp 235c0c
+ :  let curswant_before = winsaveview().curswant
Karsten Hopp 235c0c
+ :  execute 'let' '&'.a:option_name '=' '&'.a:option_name
Karsten Hopp 235c0c
+ :  let curswant_after = winsaveview().curswant
Karsten Hopp 235c0c
+ :  return [a:option_name, curswant_before, curswant_after]
Karsten Hopp 235c0c
+ :endfunction
Karsten Hopp 235c0c
+ :
Karsten Hopp 235c0c
+ :new
Karsten Hopp 235c0c
+ :put =['1234567890', '12345']
Karsten Hopp 235c0c
+ :1 delete _
Karsten Hopp 235c0c
+ :let result = []
Karsten Hopp 235c0c
+ :for option_name in target_option_names
Karsten Hopp 235c0c
+ :  call add(result, TestCurswant(option_name))
Karsten Hopp 235c0c
+ :endfor
Karsten Hopp 235c0c
+ :
Karsten Hopp 235c0c
+ :new
Karsten Hopp 235c0c
+ :put =map(copy(result), 'join(v:val, '' '')')
Karsten Hopp 235c0c
+ :1 delete _
Karsten Hopp 235c0c
+ :write test.out
Karsten Hopp 235c0c
+ :
Karsten Hopp 235c0c
+ :qall!
Karsten Hopp 235c0c
+ ENDTEST
Karsten Hopp 235c0c
+ 
Karsten Hopp 235c0c
+ start target options
Karsten Hopp 235c0c
+ 	tabstop
Karsten Hopp 235c0c
+ 	timeoutlen
Karsten Hopp 235c0c
+ 	ttimeoutlen
Karsten Hopp 235c0c
+ end target options
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/test84.ok	2012-03-28 19:55:12.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/test84.ok	2012-03-28 19:48:36.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 0 ****
Karsten Hopp 235c0c
--- 1,3 ----
Karsten Hopp 235c0c
+ tabstop 7 4
Karsten Hopp 235c0c
+ timeoutlen 7 7
Karsten Hopp 235c0c
+ ttimeoutlen 7 7
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/Make_amiga.mak	2011-10-12 19:53:31.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/Make_amiga.mak	2012-03-28 18:14:08.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 29,35 ****
Karsten Hopp 235c0c
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 235c0c
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 235c0c
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 235c0c
! 		test81.out test82.out test83.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  .SUFFIXES: .in .out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
--- 29,35 ----
Karsten Hopp 235c0c
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 235c0c
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 235c0c
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 235c0c
! 		test81.out test82.out test83.out test84.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  .SUFFIXES: .in .out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 132,134 ****
Karsten Hopp 235c0c
--- 132,135 ----
Karsten Hopp 235c0c
  test81.out: test81.in
Karsten Hopp 235c0c
  test82.out: test82.in
Karsten Hopp 235c0c
  test83.out: test83.in
Karsten Hopp 235c0c
+ test84.out: test84.in
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/Make_dos.mak	2011-10-12 19:53:31.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/Make_dos.mak	2012-03-28 18:14:41.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 29,35 ****
Karsten Hopp 235c0c
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp 235c0c
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 235c0c
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 235c0c
! 		test79.out test80.out test81.out test82.out test83.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
--- 29,36 ----
Karsten Hopp 235c0c
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp 235c0c
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 235c0c
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 235c0c
! 		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 235c0c
! 		test84.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/Make_ming.mak	2011-10-12 19:53:31.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/Make_ming.mak	2012-03-28 18:14:46.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 49,55 ****
Karsten Hopp 235c0c
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp 235c0c
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 235c0c
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 235c0c
! 		test79.out test80.out test81.out test82.out test83.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
--- 49,56 ----
Karsten Hopp 235c0c
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp 235c0c
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp 235c0c
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 235c0c
! 		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 235c0c
! 		test84.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/Make_os2.mak	2011-10-12 19:53:31.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/Make_os2.mak	2012-03-28 18:15:00.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 29,35 ****
Karsten Hopp 235c0c
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 235c0c
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 235c0c
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 235c0c
! 		test81.out test82.out test83.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  .SUFFIXES: .in .out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
--- 29,35 ----
Karsten Hopp 235c0c
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp 235c0c
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp 235c0c
  		test76.out test77.out test78.out test79.out test80.out \
Karsten Hopp 235c0c
! 		test81.out test82.out test83.out test84.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  .SUFFIXES: .in .out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/Make_vms.mms	2011-10-12 19:53:31.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/Make_vms.mms	2012-03-28 18:15:15.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 4,10 ****
Karsten Hopp 235c0c
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp 235c0c
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp 235c0c
  #
Karsten Hopp 235c0c
! # Last change:  2011 Jul 15
Karsten Hopp 235c0c
  #
Karsten Hopp 235c0c
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp 235c0c
  # Edit the lines in the Configuration section below to select.
Karsten Hopp 235c0c
--- 4,10 ----
Karsten Hopp 235c0c
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp 235c0c
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp 235c0c
  #
Karsten Hopp 235c0c
! # Last change:  2012 Mar 28
Karsten Hopp 235c0c
  #
Karsten Hopp 235c0c
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp 235c0c
  # Edit the lines in the Configuration section below to select.
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 76,82 ****
Karsten Hopp 235c0c
  	 test66.out test67.out test68.out test69.out \
Karsten Hopp 235c0c
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp 235c0c
  	 test77.out test78.out test79.out test80.out test81.out \
Karsten Hopp 235c0c
! 	 test82.out test83.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  # Known problems:
Karsten Hopp 235c0c
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 235c0c
--- 76,82 ----
Karsten Hopp 235c0c
  	 test66.out test67.out test68.out test69.out \
Karsten Hopp 235c0c
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp 235c0c
  	 test77.out test78.out test79.out test80.out test81.out \
Karsten Hopp 235c0c
! 	 test82.out test83.out test84.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  # Known problems:
Karsten Hopp 235c0c
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/testdir/Makefile	2011-10-12 19:53:31.000000000 +0200
Karsten Hopp 235c0c
--- src/testdir/Makefile	2012-03-28 18:15:29.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 26,32 ****
Karsten Hopp 235c0c
  		test64.out test65.out test66.out test67.out test68.out \
Karsten Hopp 235c0c
  		test69.out test70.out test71.out test72.out test73.out \
Karsten Hopp 235c0c
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 235c0c
! 		test79.out test80.out test81.out test82.out test83.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  SCRIPTS_GUI = test16.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
--- 26,33 ----
Karsten Hopp 235c0c
  		test64.out test65.out test66.out test67.out test68.out \
Karsten Hopp 235c0c
  		test69.out test70.out test71.out test72.out test73.out \
Karsten Hopp 235c0c
  		test74.out test75.out test76.out test77.out test78.out \
Karsten Hopp 235c0c
! 		test79.out test80.out test81.out test82.out test83.out \
Karsten Hopp 235c0c
! 		test84.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
  SCRIPTS_GUI = test16.out
Karsten Hopp 235c0c
  
Karsten Hopp 235c0c
*** ../vim-7.3.486/src/version.c	2012-03-28 17:43:06.000000000 +0200
Karsten Hopp 235c0c
--- src/version.c	2012-03-28 19:49:41.000000000 +0200
Karsten Hopp 235c0c
***************
Karsten Hopp 235c0c
*** 716,717 ****
Karsten Hopp 235c0c
--- 716,719 ----
Karsten Hopp 235c0c
  {   /* Add new patch number below this line */
Karsten Hopp 235c0c
+ /**/
Karsten Hopp 235c0c
+     487,
Karsten Hopp 235c0c
  /**/
Karsten Hopp 235c0c
Karsten Hopp 235c0c
-- 
Karsten Hopp 235c0c
"Time flies like an arrow".  So I put an arrow on my desk, now
Karsten Hopp 235c0c
awaiting one of these time flies showing up.
Karsten Hopp 235c0c
Karsten Hopp 235c0c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 235c0c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 235c0c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 235c0c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///