lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
00c5dd9
To: vim_dev@googlegroups.com
00c5dd9
Subject: Patch 7.4.027
00c5dd9
Fcc: outbox
00c5dd9
From: Bram Moolenaar <Bram@moolenaar.net>
00c5dd9
Mime-Version: 1.0
00c5dd9
Content-Type: text/plain; charset=UTF-8
00c5dd9
Content-Transfer-Encoding: 8bit
00c5dd9
------------
00c5dd9
00c5dd9
Patch 7.4.027 (after 7.4.025)
00c5dd9
Problem:    Another valgrind error when using CTRL-X CTRL-F at the start of
00c5dd9
	    the line. (Dominique Pelle)
00c5dd9
Solution:   Don't call mb_ptr_back() at the start of the line.  Add a test.
00c5dd9
Files:	    src/edit.c, src/testdir/test32.in
00c5dd9
00c5dd9
00c5dd9
*** ../vim-7.4.026/src/edit.c	2013-09-08 16:03:40.000000000 +0200
00c5dd9
--- src/edit.c	2013-09-08 18:18:32.000000000 +0200
00c5dd9
***************
00c5dd9
*** 5183,5197 ****
00c5dd9
  	}
00c5dd9
  	else if (ctrl_x_mode == CTRL_X_FILES)
00c5dd9
  	{
00c5dd9
- 	    char_u	*p = line + startcol;
00c5dd9
- 
00c5dd9
  	    /* Go back to just before the first filename character. */
00c5dd9
! 	    mb_ptr_back(line, p);
00c5dd9
! 	    while (p > line && vim_isfilec(PTR2CHAR(p)))
00c5dd9
  		mb_ptr_back(line, p);
00c5dd9
! 	    startcol = (int)(p - line) + 1;
00c5dd9
! 	    if (p == line && vim_isfilec(PTR2CHAR(p)))
00c5dd9
! 		startcol = 0;
00c5dd9
  
00c5dd9
  	    compl_col += startcol;
00c5dd9
  	    compl_length = (int)curs_col - startcol;
00c5dd9
--- 5183,5201 ----
00c5dd9
  	}
00c5dd9
  	else if (ctrl_x_mode == CTRL_X_FILES)
00c5dd9
  	{
00c5dd9
  	    /* Go back to just before the first filename character. */
00c5dd9
! 	    if (startcol > 0)
00c5dd9
! 	    {
00c5dd9
! 		char_u	*p = line + startcol;
00c5dd9
! 
00c5dd9
  		mb_ptr_back(line, p);
00c5dd9
! 		while (p > line && vim_isfilec(PTR2CHAR(p)))
00c5dd9
! 		    mb_ptr_back(line, p);
00c5dd9
! 		if (p == line && vim_isfilec(PTR2CHAR(p)))
00c5dd9
! 		    startcol = 0;
00c5dd9
! 		else
00c5dd9
! 		    startcol = (int)(p - line) + 1;
00c5dd9
! 	    }
00c5dd9
  
00c5dd9
  	    compl_col += startcol;
00c5dd9
  	    compl_length = (int)curs_col - startcol;
00c5dd9
*** ../vim-7.4.026/src/testdir/test32.in	2010-05-15 13:04:10.000000000 +0200
00c5dd9
--- src/testdir/test32.in	2013-09-08 18:08:07.000000000 +0200
00c5dd9
***************
00c5dd9
*** 36,41 ****
00c5dd9
--- 36,44 ----
00c5dd9
  :w Xtest11.one
00c5dd9
  :w Xtest11.two
00c5dd9
  O??IX?A????
00c5dd9
+ :" use CTRL-X CTRL-F to complete Xtest11.one, remove it and then use
00c5dd9
+ :" CTRL-X CTRL-F again to verify this doesn't cause trouble.
00c5dd9
+ OX?????????????ddk
00c5dd9
  :se cpt=w
00c5dd9
  OST??????
00c5dd9
  :se cpt=u nohid
00c5dd9
*** ../vim-7.4.026/src/version.c	2013-09-08 16:07:03.000000000 +0200
00c5dd9
--- src/version.c	2013-09-08 18:14:17.000000000 +0200
00c5dd9
***************
00c5dd9
*** 740,741 ****
00c5dd9
--- 740,743 ----
00c5dd9
  {   /* Add new patch number below this line */
00c5dd9
+ /**/
00c5dd9
+     27,
00c5dd9
  /**/
00c5dd9
00c5dd9
-- 
00c5dd9
hundred-and-one symptoms of being an internet addict:
00c5dd9
190. You quickly hand over your wallet, leather jacket, and car keys
00c5dd9
     during a mugging, then proceed to beat the crap out of your
00c5dd9
     assailant when he asks for your laptop.
00c5dd9
00c5dd9
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
00c5dd9
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
00c5dd9
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
00c5dd9
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///