Karsten Hopp 00e0e8
To: vim-dev@vim.org
Karsten Hopp 00e0e8
Subject: Patch 7.1.325
Karsten Hopp 00e0e8
Fcc: outbox
Karsten Hopp 00e0e8
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 00e0e8
Mime-Version: 1.0
Karsten Hopp 00e0e8
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 00e0e8
Content-Transfer-Encoding: 8bit
Karsten Hopp 00e0e8
------------
Karsten Hopp 00e0e8
Karsten Hopp 00e0e8
Patch 7.1.325
Karsten Hopp 00e0e8
Problem:    When editing a command line that's longer than available space in
Karsten Hopp 00e0e8
	    the window, the characters at the end are in reverse order.
Karsten Hopp 00e0e8
Solution:   Increment the insert position even when the command line doesn't
Karsten Hopp 00e0e8
	    fit.  (Ingo Karkat)
Karsten Hopp 00e0e8
Files:	    src/ex_getln.c
Karsten Hopp 00e0e8
Karsten Hopp 00e0e8
Karsten Hopp 00e0e8
*** ../vim-7.1.324/src/ex_getln.c	Fri Jun 20 12:55:28 2008
Karsten Hopp 00e0e8
--- src/ex_getln.c	Fri Jun 20 16:45:55 2008
Karsten Hopp 00e0e8
***************
Karsten Hopp 00e0e8
*** 2053,2062 ****
Karsten Hopp 00e0e8
  	if (has_mbyte)
Karsten Hopp 00e0e8
  	    correct_cmdspos(i, c);
Karsten Hopp 00e0e8
  #endif
Karsten Hopp 00e0e8
! 	/* If the cmdline doesn't fit, put cursor on last visible char. */
Karsten Hopp 00e0e8
  	if ((ccline.cmdspos += c) >= m)
Karsten Hopp 00e0e8
  	{
Karsten Hopp 00e0e8
- 	    ccline.cmdpos = i - 1;
Karsten Hopp 00e0e8
  	    ccline.cmdspos -= c;
Karsten Hopp 00e0e8
  	    break;
Karsten Hopp 00e0e8
  	}
Karsten Hopp 00e0e8
--- 2053,2062 ----
Karsten Hopp 00e0e8
  	if (has_mbyte)
Karsten Hopp 00e0e8
  	    correct_cmdspos(i, c);
Karsten Hopp 00e0e8
  #endif
Karsten Hopp 00e0e8
! 	/* If the cmdline doesn't fit, show cursor on last visible char.
Karsten Hopp 00e0e8
! 	 * Don't move the cursor itself, so we can still append. */
Karsten Hopp 00e0e8
  	if ((ccline.cmdspos += c) >= m)
Karsten Hopp 00e0e8
  	{
Karsten Hopp 00e0e8
  	    ccline.cmdspos -= c;
Karsten Hopp 00e0e8
  	    break;
Karsten Hopp 00e0e8
  	}
Karsten Hopp 00e0e8
***************
Karsten Hopp 00e0e8
*** 2829,2838 ****
Karsten Hopp 00e0e8
  		if (has_mbyte)
Karsten Hopp 00e0e8
  		    correct_cmdspos(ccline.cmdpos, c);
Karsten Hopp 00e0e8
  #endif
Karsten Hopp 00e0e8
! 		/* Stop cursor at the end of the screen */
Karsten Hopp 00e0e8
! 		if (ccline.cmdspos + c >= m)
Karsten Hopp 00e0e8
! 		    break;
Karsten Hopp 00e0e8
! 		ccline.cmdspos += c;
Karsten Hopp 00e0e8
  #ifdef FEAT_MBYTE
Karsten Hopp 00e0e8
  		if (has_mbyte)
Karsten Hopp 00e0e8
  		{
Karsten Hopp 00e0e8
--- 2829,2839 ----
Karsten Hopp 00e0e8
  		if (has_mbyte)
Karsten Hopp 00e0e8
  		    correct_cmdspos(ccline.cmdpos, c);
Karsten Hopp 00e0e8
  #endif
Karsten Hopp 00e0e8
! 		/* Stop cursor at the end of the screen, but do increment the
Karsten Hopp 00e0e8
! 		 * insert position, so that entering a very long command
Karsten Hopp 00e0e8
! 		 * works, even though you can't see it. */
Karsten Hopp 00e0e8
! 		if (ccline.cmdspos + c < m)
Karsten Hopp 00e0e8
! 		    ccline.cmdspos += c;
Karsten Hopp 00e0e8
  #ifdef FEAT_MBYTE
Karsten Hopp 00e0e8
  		if (has_mbyte)
Karsten Hopp 00e0e8
  		{
Karsten Hopp 00e0e8
***************
Karsten Hopp 00e0e8
*** 3332,3338 ****
Karsten Hopp 00e0e8
  /*
Karsten Hopp 00e0e8
   * Do wildcard expansion on the string 'str'.
Karsten Hopp 00e0e8
   * Chars that should not be expanded must be preceded with a backslash.
Karsten Hopp 00e0e8
!  * Return a pointer to alloced memory containing the new string.
Karsten Hopp 00e0e8
   * Return NULL for failure.
Karsten Hopp 00e0e8
   *
Karsten Hopp 00e0e8
   * "orig" is the originally expanded string, copied to allocated memory.  It
Karsten Hopp 00e0e8
--- 3333,3339 ----
Karsten Hopp 00e0e8
  /*
Karsten Hopp 00e0e8
   * Do wildcard expansion on the string 'str'.
Karsten Hopp 00e0e8
   * Chars that should not be expanded must be preceded with a backslash.
Karsten Hopp 00e0e8
!  * Return a pointer to allocated memory containing the new string.
Karsten Hopp 00e0e8
   * Return NULL for failure.
Karsten Hopp 00e0e8
   *
Karsten Hopp 00e0e8
   * "orig" is the originally expanded string, copied to allocated memory.  It
Karsten Hopp 00e0e8
***************
Karsten Hopp 00e0e8
*** 6111,6117 ****
Karsten Hopp 00e0e8
  
Karsten Hopp 00e0e8
      exmode_active = save_exmode;
Karsten Hopp 00e0e8
  
Karsten Hopp 00e0e8
!     /* Safety check: The old window or buffer was deleted: It's a a bug when
Karsten Hopp 00e0e8
       * this happens! */
Karsten Hopp 00e0e8
      if (!win_valid(old_curwin) || !buf_valid(old_curbuf))
Karsten Hopp 00e0e8
      {
Karsten Hopp 00e0e8
--- 6112,6118 ----
Karsten Hopp 00e0e8
  
Karsten Hopp 00e0e8
      exmode_active = save_exmode;
Karsten Hopp 00e0e8
  
Karsten Hopp 00e0e8
!     /* Safety check: The old window or buffer was deleted: It's a bug when
Karsten Hopp 00e0e8
       * this happens! */
Karsten Hopp 00e0e8
      if (!win_valid(old_curwin) || !buf_valid(old_curbuf))
Karsten Hopp 00e0e8
      {
Karsten Hopp 00e0e8
*** ../vim-7.1.324/src/version.c	Fri Jun 20 18:06:15 2008
Karsten Hopp 00e0e8
--- src/version.c	Fri Jun 20 18:27:54 2008
Karsten Hopp 00e0e8
***************
Karsten Hopp 00e0e8
*** 668,669 ****
Karsten Hopp 00e0e8
--- 673,676 ----
Karsten Hopp 00e0e8
  {   /* Add new patch number below this line */
Karsten Hopp 00e0e8
+ /**/
Karsten Hopp 00e0e8
+     325,
Karsten Hopp 00e0e8
  /**/
Karsten Hopp 00e0e8
Karsten Hopp 00e0e8
-- 
Karsten Hopp 00e0e8
"I can't complain, but sometimes I still do."   (Joe Walsh)
Karsten Hopp 00e0e8
Karsten Hopp 00e0e8
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 00e0e8
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 00e0e8
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 00e0e8
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///