3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.025
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.025 (after 7.4.019
3ef2ca
Problem:    Reading before start of a string.
3ef2ca
Solution:   Do not call mb_ptr_back() at start of a string. (Dominique Pelle)
3ef2ca
Files:	    src/edit.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.024/src/edit.c	2013-09-07 16:35:38.000000000 +0200
3ef2ca
--- src/edit.c	2013-09-08 15:57:20.000000000 +0200
3ef2ca
***************
3ef2ca
*** 5187,5197 ****
3ef2ca
  
3ef2ca
  	    /* Go back to just before the first filename character. */
3ef2ca
  	    mb_ptr_back(line, p);
3ef2ca
! 	    while (vim_isfilec(PTR2CHAR(p)) && p >= line)
3ef2ca
  		mb_ptr_back(line, p);
3ef2ca
! 	    startcol = (int)(p - line);
3ef2ca
  
3ef2ca
! 	    compl_col += ++startcol;
3ef2ca
  	    compl_length = (int)curs_col - startcol;
3ef2ca
  	    compl_pattern = addstar(line + compl_col, compl_length,
3ef2ca
  								EXPAND_FILES);
3ef2ca
--- 5187,5199 ----
3ef2ca
  
3ef2ca
  	    /* Go back to just before the first filename character. */
3ef2ca
  	    mb_ptr_back(line, p);
3ef2ca
! 	    while (p > line && vim_isfilec(PTR2CHAR(p)))
3ef2ca
  		mb_ptr_back(line, p);
3ef2ca
! 	    startcol = (int)(p - line) + 1;
3ef2ca
! 	    if (p == line && vim_isfilec(PTR2CHAR(p)))
3ef2ca
! 		startcol = 0;
3ef2ca
  
3ef2ca
! 	    compl_col += startcol;
3ef2ca
  	    compl_length = (int)curs_col - startcol;
3ef2ca
  	    compl_pattern = addstar(line + compl_col, compl_length,
3ef2ca
  								EXPAND_FILES);
3ef2ca
*** ../vim-7.4.024/src/version.c	2013-09-08 15:40:45.000000000 +0200
3ef2ca
--- src/version.c	2013-09-08 15:52:39.000000000 +0200
3ef2ca
***************
3ef2ca
*** 740,741 ****
3ef2ca
--- 740,743 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     25,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
hundred-and-one symptoms of being an internet addict:
3ef2ca
188. You purchase a laptop so you can surf while sitting on the can.
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///