1be6c06
To: vim-dev@vim.org
1be6c06
Subject: Patch 7.1.203
1be6c06
Fcc: outbox
1be6c06
From: Bram Moolenaar <Bram@moolenaar.net>
1be6c06
Mime-Version: 1.0
1be6c06
Content-Type: text/plain; charset=ISO-8859-1
1be6c06
Content-Transfer-Encoding: 8bit
1be6c06
------------
1be6c06
1be6c06
Patch 7.1.203
1be6c06
Problem:    When 'virtualedit' is "onemore" then "99|" works but ":normal 99|"
1be6c06
	    doesn't.  (Andy Wokula)
1be6c06
Solution:   Check for "onemore" flag in check_cursor_col().
1be6c06
Files:	    src/misc2.c
1be6c06
1be6c06
1be6c06
*** ../vim-7.1.202/src/misc2.c	Sat Nov 24 21:27:33 2007
1be6c06
--- src/misc2.c	Fri Jan  4 21:24:46 2008
1be6c06
***************
1be6c06
*** 507,517 ****
1be6c06
  	curwin->w_cursor.col = 0;
1be6c06
      else if (curwin->w_cursor.col >= len)
1be6c06
      {
1be6c06
! 	/* Allow cursor past end-of-line in Insert mode, restarting Insert
1be6c06
! 	 * mode or when in Visual mode and 'selection' isn't "old" */
1be6c06
  	if ((State & INSERT) || restart_edit
1be6c06
  #ifdef FEAT_VISUAL
1be6c06
  		|| (VIsual_active && *p_sel != 'o')
1be6c06
  #endif
1be6c06
  		|| virtual_active())
1be6c06
  	    curwin->w_cursor.col = len;
1be6c06
--- 508,523 ----
1be6c06
  	curwin->w_cursor.col = 0;
1be6c06
      else if (curwin->w_cursor.col >= len)
1be6c06
      {
1be6c06
! 	/* Allow cursor past end-of-line when:
1be6c06
! 	 * - in Insert mode or restarting Insert mode
1be6c06
! 	 * - in Visual mode and 'selection' isn't "old"
1be6c06
! 	 * - 'virtualedit' is set */
1be6c06
  	if ((State & INSERT) || restart_edit
1be6c06
  #ifdef FEAT_VISUAL
1be6c06
  		|| (VIsual_active && *p_sel != 'o')
1be6c06
+ #endif
1be6c06
+ #ifdef FEAT_VIRTUALEDIT
1be6c06
+ 		|| (ve_flags & VE_ONEMORE)
1be6c06
  #endif
1be6c06
  		|| virtual_active())
1be6c06
  	    curwin->w_cursor.col = len;
1be6c06
*** ../vim-7.1.202/src/version.c	Fri Jan  4 17:46:46 2008
1be6c06
--- src/version.c	Fri Jan  4 21:22:29 2008
1be6c06
***************
1be6c06
*** 668,669 ****
1be6c06
--- 668,671 ----
1be6c06
  {   /* Add new patch number below this line */
1be6c06
+ /**/
1be6c06
+     203,
1be6c06
  /**/
1be6c06
1be6c06
-- 
1be6c06
`When any government, or any church for that matter, undertakes to say to
1be6c06
 its subjects, "This you may not read, this you must not see, this you are
1be6c06
 forbidden to know," the end result is tyranny and oppression no matter how
1be6c06
 holy the motives' -- Robert A Heinlein, "If this goes on --"
1be6c06
1be6c06
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
1be6c06
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1be6c06
\\\        download, build and distribute -- http://www.A-A-P.org        ///
1be6c06
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///