lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.1.325
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.1.325
Problem:    When editing a command line that's longer than available space in
	    the window, the characters at the end are in reverse order.
Solution:   Increment the insert position even when the command line doesn't
	    fit.  (Ingo Karkat)
Files:	    src/ex_getln.c


*** ../vim-7.1.324/src/ex_getln.c	Fri Jun 20 12:55:28 2008
--- src/ex_getln.c	Fri Jun 20 16:45:55 2008
***************
*** 2053,2062 ****
  	if (has_mbyte)
  	    correct_cmdspos(i, c);
  #endif
! 	/* If the cmdline doesn't fit, put cursor on last visible char. */
  	if ((ccline.cmdspos += c) >= m)
  	{
- 	    ccline.cmdpos = i - 1;
  	    ccline.cmdspos -= c;
  	    break;
  	}
--- 2053,2062 ----
  	if (has_mbyte)
  	    correct_cmdspos(i, c);
  #endif
! 	/* If the cmdline doesn't fit, show cursor on last visible char.
! 	 * Don't move the cursor itself, so we can still append. */
  	if ((ccline.cmdspos += c) >= m)
  	{
  	    ccline.cmdspos -= c;
  	    break;
  	}
***************
*** 2829,2838 ****
  		if (has_mbyte)
  		    correct_cmdspos(ccline.cmdpos, c);
  #endif
! 		/* Stop cursor at the end of the screen */
! 		if (ccline.cmdspos + c >= m)
! 		    break;
! 		ccline.cmdspos += c;
  #ifdef FEAT_MBYTE
  		if (has_mbyte)
  		{
--- 2829,2839 ----
  		if (has_mbyte)
  		    correct_cmdspos(ccline.cmdpos, c);
  #endif
! 		/* Stop cursor at the end of the screen, but do increment the
! 		 * insert position, so that entering a very long command
! 		 * works, even though you can't see it. */
! 		if (ccline.cmdspos + c < m)
! 		    ccline.cmdspos += c;
  #ifdef FEAT_MBYTE
  		if (has_mbyte)
  		{
***************
*** 3332,3338 ****
  /*
   * Do wildcard expansion on the string 'str'.
   * Chars that should not be expanded must be preceded with a backslash.
!  * Return a pointer to alloced memory containing the new string.
   * Return NULL for failure.
   *
   * "orig" is the originally expanded string, copied to allocated memory.  It
--- 3333,3339 ----
  /*
   * Do wildcard expansion on the string 'str'.
   * Chars that should not be expanded must be preceded with a backslash.
!  * Return a pointer to allocated memory containing the new string.
   * Return NULL for failure.
   *
   * "orig" is the originally expanded string, copied to allocated memory.  It
***************
*** 6111,6117 ****
  
      exmode_active = save_exmode;
  
!     /* Safety check: The old window or buffer was deleted: It's a a bug when
       * this happens! */
      if (!win_valid(old_curwin) || !buf_valid(old_curbuf))
      {
--- 6112,6118 ----
  
      exmode_active = save_exmode;
  
!     /* Safety check: The old window or buffer was deleted: It's a bug when
       * this happens! */
      if (!win_valid(old_curwin) || !buf_valid(old_curbuf))
      {
*** ../vim-7.1.324/src/version.c	Fri Jun 20 18:06:15 2008
--- src/version.c	Fri Jun 20 18:27:54 2008
***************
*** 668,669 ****
--- 673,676 ----
  {   /* Add new patch number below this line */
+ /**/
+     325,
  /**/

-- 
"I can't complain, but sometimes I still do."   (Joe Walsh)

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///