r1119 - in /trunk/packages/vim: debian/README debian/changelog upstream/patches/7.1.169 upstream/patches/7.1.170 upstream/patches/7.1.171 upstream/patches/7.1.172 upstream/patches/7.1.173 upstream/patches/7.1.174 upstream/patches/7.1.175

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Sun Dec 9 22:56:00 UTC 2007


Author: jamessan
Date: Sun Dec  9 22:56:00 2007
New Revision: 1119

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1119
Log:
Upstream patches 169 - 175

Added:
    trunk/packages/vim/upstream/patches/7.1.169
    trunk/packages/vim/upstream/patches/7.1.170
    trunk/packages/vim/upstream/patches/7.1.171
    trunk/packages/vim/upstream/patches/7.1.172
    trunk/packages/vim/upstream/patches/7.1.173
    trunk/packages/vim/upstream/patches/7.1.174
    trunk/packages/vim/upstream/patches/7.1.175
Modified:
    trunk/packages/vim/debian/README
    trunk/packages/vim/debian/changelog

Modified: trunk/packages/vim/debian/README
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/README?rev=1119&op=diff
==============================================================================
--- trunk/packages/vim/debian/README (original)
+++ trunk/packages/vim/debian/README Sun Dec  9 22:56:00 2007
@@ -197,3 +197,10 @@
   2134  7.1.166  memory leak when using "gp" in Visual mode
   2528  7.1.167  xxd crashes when using "xxd -b -c 110"
   2989  7.1.168  (extra) Win32 GUI: when no focus click doesn't position cursor
+  1926  7.1.169  using uninitialized memory when system() fails
+  1722  7.1.170  overlapping arguments to strcpy()
+  2324  7.1.171  reading one byte before allocated memory.
+  1536  7.1.172  if 'buftype' is "acwrite" Vim still does overwrite check
+  1928  7.1.173  accessing freed memory when using "\%^" pattern
+  2197  7.1.174  writing NUL past end of a buffer
+  4722  7.1.175  <BS> doesn't work with some combination of option settings

Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=1119&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Sun Dec  9 22:56:00 2007
@@ -1,4 +1,4 @@
-vim (1:7.1-168+1) unstable; urgency=low
+vim (1:7.1-175+1) unstable; urgency=low
 
   [ James Vega ]
   * debian/rules:
@@ -6,7 +6,7 @@
   * Fix a typo in debsources.vim-syntax.diff. (Closes: #454672)
 
   [ Debian Vim Maintainers ]
-  * New upstream patch (168), see README.gz for details.
+  * New upstream patches (168 - 175), see README.gz for details.
 
   [ James Vega ]
   * Add spellfile.vim-doc.diff, which explains that a writable spell directory
@@ -27,8 +27,12 @@
     (Closes: #454933)
   * runtime/syntax/debcontrol.vim: Don't require a three part domain for the
     Homepage field.  (Closes: #455341)
-
- -- James Vega <jamessan at debian.org>  Sun, 09 Dec 2007 16:37:15 -0500
+  * Install the presubj file under /usr/share/bug/ for every vim variant, not
+    just vim.
+  * Add versioned Conflicts/Replaces on vim-common for the vim package since
+    it contains /usr/share/bug/vim/presubj now.
+
+ -- James Vega <jamessan at debian.org>  Sun, 09 Dec 2007 17:42:17 -0500
 
 vim (1:7.1-167+1) unstable; urgency=low
 

Added: trunk/packages/vim/upstream/patches/7.1.169
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.169?rev=1119&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.169 (added)
+++ trunk/packages/vim/upstream/patches/7.1.169 Sun Dec  9 22:56:00 2007
@@ -1,0 +1,75 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.169
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.169
+Problem:    Using uninitialized variable when system() fails. (Dominique
+            Pelle)
+Solution:   Let system() return an empty string when it fails.
+Files:      src/eval.c
+
+
+*** ../vim-7.1.168/src/eval.c	Thu Nov  8 20:47:34 2007
+--- src/eval.c	Fri Nov 30 21:01:26 2007
+***************
+*** 15826,15832 ****
+      FILE	*fd;
+  
+      if (check_restricted() || check_secure())
+! 	return;
+  
+      if (argvars[1].v_type != VAR_UNKNOWN)
+      {
+--- 15826,15832 ----
+      FILE	*fd;
+  
+      if (check_restricted() || check_secure())
+! 	goto done;
+  
+      if (argvars[1].v_type != VAR_UNKNOWN)
+      {
+***************
+*** 15837,15843 ****
+  	if ((infile = vim_tempname('i')) == NULL)
+  	{
+  	    EMSG(_(e_notmp));
+! 	    return;
+  	}
+  
+  	fd = mch_fopen((char *)infile, WRITEBIN);
+--- 15837,15843 ----
+  	if ((infile = vim_tempname('i')) == NULL)
+  	{
+  	    EMSG(_(e_notmp));
+! 	    goto done;
+  	}
+  
+  	fd = mch_fopen((char *)infile, WRITEBIN);
+*** ../vim-7.1.168/src/version.c	Mon Dec  3 22:20:17 2007
+--- src/version.c	Fri Dec  7 17:07:32 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     169,
+  /**/
+
+-- 
+% cat /usr/include/sys/errno.h
+#define	EPERM		1		/* Operation not permitted */
+#define	ENOENT		2		/* No such file or directory */
+#define	ESRCH		3		/* No such process */
+[...]
+#define EMACS		666		/* Too many macros */
+%
+
+ /// Bram Moolenaar -- Bram at 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    ///

Added: trunk/packages/vim/upstream/patches/7.1.170
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.170?rev=1119&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.170 (added)
+++ trunk/packages/vim/upstream/patches/7.1.170 Sun Dec  9 22:56:00 2007
@@ -1,0 +1,58 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.170
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.170
+Problem:    Valgrind warning for overlapping arguments for strcpy().
+Solution:   Use mch_memmove() instead. (Dominique Pelle)
+Files:	    src/getchar.c
+
+
+*** ../vim-7.1.169/src/getchar.c	Thu Sep 13 18:25:08 2007
+--- src/getchar.c	Mon Dec  3 20:42:29 2007
+***************
+*** 253,260 ****
+  	return;
+      }
+      else if (buf->bh_index != 0)
+! 	STRCPY(buf->bh_first.b_next->b_str,
+! 				 buf->bh_first.b_next->b_str + buf->bh_index);
+      buf->bh_index = 0;
+  
+      if (buf->bh_space >= (int)slen)
+--- 253,261 ----
+  	return;
+      }
+      else if (buf->bh_index != 0)
+! 	mch_memmove(buf->bh_first.b_next->b_str,
+! 		    buf->bh_first.b_next->b_str + buf->bh_index,
+! 		    STRLEN(buf->bh_first.b_next->b_str + buf->bh_index) + 1);
+      buf->bh_index = 0;
+  
+      if (buf->bh_space >= (int)slen)
+*** ../vim-7.1.169/src/version.c	Fri Dec  7 17:08:35 2007
+--- src/version.c	Fri Dec  7 17:27:13 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     170,
+  /**/
+
+-- 
+Some of the well know MS-Windows errors:
+	ESLEEP		Operator fell asleep
+	ENOERR		No error yet
+	EDOLLAR		OS too expensive
+	EWINDOWS	MS-Windows loaded, system in danger
+
+ /// Bram Moolenaar -- Bram at 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    ///

Added: trunk/packages/vim/upstream/patches/7.1.171
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.171?rev=1119&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.171 (added)
+++ trunk/packages/vim/upstream/patches/7.1.171 Sun Dec  9 22:56:00 2007
@@ -1,0 +1,79 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.171
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.171
+Problem:    Reading one byte before allocated memory.
+Solution:   Check index not to become negative. (Dominique Pelle)
+Files:	    src/ex_getln.c
+
+
+*** ../vim-7.1.170/src/ex_getln.c	Tue Oct 30 17:36:31 2007
+--- src/ex_getln.c	Tue Dec  4 21:49:24 2007
+***************
+*** 1186,1195 ****
+  	case K_LEFT:
+  	case K_S_LEFT:
+  	case K_C_LEFT:
+  		do
+  		{
+- 		    if (ccline.cmdpos == 0)
+- 			break;
+  		    --ccline.cmdpos;
+  #ifdef FEAT_MBYTE
+  		    if (has_mbyte)	/* move to first byte of char */
+--- 1186,1195 ----
+  	case K_LEFT:
+  	case K_S_LEFT:
+  	case K_C_LEFT:
++ 		if (ccline.cmdpos == 0)
++ 		    goto cmdline_not_changed;
+  		do
+  		{
+  		    --ccline.cmdpos;
+  #ifdef FEAT_MBYTE
+  		    if (has_mbyte)	/* move to first byte of char */
+***************
+*** 1198,1204 ****
+  #endif
+  		    ccline.cmdspos -= cmdline_charsize(ccline.cmdpos);
+  		}
+! 		while ((c == K_S_LEFT || c == K_C_LEFT
+  			       || (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL)))
+  			&& ccline.cmdbuff[ccline.cmdpos - 1] != ' ');
+  #ifdef FEAT_MBYTE
+--- 1198,1205 ----
+  #endif
+  		    ccline.cmdspos -= cmdline_charsize(ccline.cmdpos);
+  		}
+! 		while (ccline.cmdpos > 0
+! 			&& (c == K_S_LEFT || c == K_C_LEFT
+  			       || (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL)))
+  			&& ccline.cmdbuff[ccline.cmdpos - 1] != ' ');
+  #ifdef FEAT_MBYTE
+*** ../vim-7.1.170/src/version.c	Fri Dec  7 17:30:04 2007
+--- src/version.c	Fri Dec  7 20:00:06 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     171,
+  /**/
+
+-- 
+Some of the well know MS-Windows errors:
+	EMULTI		Multitasking attempted, system confused
+	EKEYBOARD	Keyboard locked, try getting out of this one!
+	EXPLAIN		Unexplained error, please tell us what happened
+	EFUTURE		Reserved for our future mistakes
+
+ /// Bram Moolenaar -- Bram at 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    ///

Added: trunk/packages/vim/upstream/patches/7.1.172
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.172?rev=1119&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.172 (added)
+++ trunk/packages/vim/upstream/patches/7.1.172 Sun Dec  9 22:56:00 2007
@@ -1,0 +1,50 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.172
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.172
+Problem:    When 'buftype' is "acwrite" Vim still checks if the file or
+	    directory exists before overwriting.
+Solution:   Don't check for overwriting when the buffer name is not a file
+	    name.
+Files:	    src/ex_cmds.c
+
+
+*** ../vim-7.1.171/src/ex_cmds.c	Tue Nov 20 18:03:34 2007
+--- src/ex_cmds.c	Fri Dec  7 22:13:32 2007
+***************
+*** 2732,2737 ****
+--- 2732,2740 ----
+  		    && vim_strchr(p_cpo, CPO_OVERNEW) == NULL)
+  		|| (buf->b_flags & BF_READERR))
+  	    && !p_wa
++ #ifdef FEAT_QUICKFIX
++ 	    && !bt_nofile(buf)
++ #endif
+  	    && vim_fexists(ffname))
+      {
+  	if (!eap->forceit && !eap->append)
+*** ../vim-7.1.171/src/version.c	Fri Dec  7 20:28:13 2007
+--- src/version.c	Sat Dec  8 22:18:54 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     172,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+206. You religiously respond immediately to e-mail, while ignoring
+     your growing pile of snail mail.
+
+ /// Bram Moolenaar -- Bram at 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    ///

Added: trunk/packages/vim/upstream/patches/7.1.173
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.173?rev=1119&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.173 (added)
+++ trunk/packages/vim/upstream/patches/7.1.173 Sun Dec  9 22:56:00 2007
@@ -1,0 +1,61 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.173
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.173
+Problem:    Accessing freed memory. (Dominique Pelle)
+Solution:   Don't call reg_getline() to check if a line is the first in the
+	    file.
+Files:	    src/regexp.c
+
+
+*** ../vim-7.1.172/src/regexp.c	Thu Nov 29 21:26:38 2007
+--- src/regexp.c	Sat Dec  8 15:54:05 2007
+***************
+*** 3810,3820 ****
+  	    break;
+  
+  	  case RE_BOF:
+! 	    /* Passing -1 to the getline() function provided for the search
+! 	     * should always return NULL if the current line is the first
+! 	     * line of the file. */
+  	    if (reglnum != 0 || reginput != regline
+! 			|| (REG_MULTI && reg_getline((linenr_T)-1) != NULL))
+  		status = RA_NOMATCH;
+  	    break;
+  
+--- 3810,3820 ----
+  	    break;
+  
+  	  case RE_BOF:
+! 	    /* We're not at the beginning of the file when below the first
+! 	     * line where we started, not at the start of the line or we
+! 	     * didn't start at the first line of the buffer. */
+  	    if (reglnum != 0 || reginput != regline
+! 					  || (REG_MULTI && reg_firstlnum > 1))
+  		status = RA_NOMATCH;
+  	    break;
+  
+*** ../vim-7.1.172/src/version.c	Sat Dec  8 22:20:24 2007
+--- src/version.c	Sun Dec  9 19:24:36 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     173,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+213. Your kids start referring to you as "that guy in front of the monitor."
+
+ /// Bram Moolenaar -- Bram at 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    ///

Added: trunk/packages/vim/upstream/patches/7.1.174
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.174?rev=1119&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.174 (added)
+++ trunk/packages/vim/upstream/patches/7.1.174 Sun Dec  9 22:56:00 2007
@@ -1,0 +1,71 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.174
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.174
+Problem:    Writing NUL past end of a buffer.
+Solution:   Copy one byte less when using strncat(). (Dominuque Pelle)
+Files:	    src/ex_cmds.c, src/ex_docmd.c
+
+
+*** ../vim-7.1.173/src/ex_cmds.c	Sat Dec  8 22:20:24 2007
+--- src/ex_cmds.c	Fri Dec  7 22:13:32 2007
+***************
+*** 1650,1656 ****
+  {
+      vim_snprintf((char *)IObuff, IOSIZE, _("%sviminfo: %s in line: "),
+  							     errnum, message);
+!     STRNCAT(IObuff, line, IOSIZE - STRLEN(IObuff));
+      if (IObuff[STRLEN(IObuff) - 1] == '\n')
+  	IObuff[STRLEN(IObuff) - 1] = NUL;
+      emsg(IObuff);
+--- 1650,1656 ----
+  {
+      vim_snprintf((char *)IObuff, IOSIZE, _("%sviminfo: %s in line: "),
+  							     errnum, message);
+!     STRNCAT(IObuff, line, IOSIZE - STRLEN(IObuff) - 1);
+      if (IObuff[STRLEN(IObuff) - 1] == '\n')
+  	IObuff[STRLEN(IObuff) - 1] = NUL;
+      emsg(IObuff);
+*** ../vim-7.1.173/src/ex_docmd.c	Sat Nov 24 21:49:19 2007
+--- src/ex_docmd.c	Fri Dec  7 21:01:03 2007
+***************
+*** 2660,2666 ****
+  		errormsg = IObuff;
+  	    }
+  	    STRCAT(errormsg, ": ");
+! 	    STRNCAT(errormsg, *cmdlinep, IOSIZE - STRLEN(IObuff));
+  	}
+  	emsg(errormsg);
+      }
+--- 2660,2666 ----
+  		errormsg = IObuff;
+  	    }
+  	    STRCAT(errormsg, ": ");
+! 	    STRNCAT(errormsg, *cmdlinep, IOSIZE - STRLEN(IObuff) - 1);
+  	}
+  	emsg(errormsg);
+      }
+*** ../vim-7.1.173/src/version.c	Sun Dec  9 19:25:35 2007
+--- src/version.c	Sun Dec  9 19:36:50 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     174,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+214. Your MCI "Circle of Friends" are all Hayes-compatible.
+
+ /// Bram Moolenaar -- Bram at 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    ///

Added: trunk/packages/vim/upstream/patches/7.1.175
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.175?rev=1119&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.175 (added)
+++ trunk/packages/vim/upstream/patches/7.1.175 Sun Dec  9 22:56:00 2007
@@ -1,0 +1,179 @@
+To: vim-dev at vim.org
+Subject: Patch 7.1.175
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.175
+Problem:    <BS> doesn't work with some combination of 'sts', 'linebreak' and
+	    'backspace'. (Francois Ingelrest)
+Solution:   When adding white space results in not moving back delete one
+	    character.
+Files:	    src/edit.c
+
+
+*** ../vim-7.1.174/src/edit.c	Sat Nov 24 21:27:33 2007
+--- src/edit.c	Fri Dec  7 21:32:48 2007
+***************
+*** 8189,8194 ****
+--- 8189,8217 ----
+      AppendCharToRedobuff(K_DEL);
+  }
+  
++ static void ins_bs_one __ARGS((colnr_T *vcolp));
++ 
++ /*
++  * Delete one character for ins_bs().
++  */
++     static void
++ ins_bs_one(vcolp)
++     colnr_T	*vcolp;
++ {
++     dec_cursor();
++     getvcol(curwin, &curwin->w_cursor, vcolp, NULL, NULL);
++     if (State & REPLACE_FLAG)
++     {
++ 	/* Don't delete characters before the insert point when in
++ 	 * Replace mode */
++ 	if (curwin->w_cursor.lnum != Insstart.lnum
++ 		|| curwin->w_cursor.col >= Insstart.col)
++ 	    replace_do_bs();
++     }
++     else
++ 	(void)del_char(FALSE);
++ }
++ 
+  /*
+   * Handle Backspace, delete-word and delete-line in Insert mode.
+   * Return TRUE when backspace was actually used.
+***************
+*** 8418,8426 ****
+  	    int		ts;
+  	    colnr_T	vcol;
+  	    colnr_T	want_vcol;
+! #if 0
+! 	    int		extra = 0;
+! #endif
+  
+  	    *inserted_space_p = FALSE;
+  	    if (p_sta && in_indent)
+--- 8441,8447 ----
+  	    int		ts;
+  	    colnr_T	vcol;
+  	    colnr_T	want_vcol;
+! 	    colnr_T	start_vcol;
+  
+  	    *inserted_space_p = FALSE;
+  	    if (p_sta && in_indent)
+***************
+*** 8431,8436 ****
+--- 8452,8458 ----
+  	     * 'showbreak' may get in the way, need to get the last column of
+  	     * the previous character. */
+  	    getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
++ 	    start_vcol = vcol;
+  	    dec_cursor();
+  	    getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol);
+  	    inc_cursor();
+***************
+*** 8439,8468 ****
+  	    /* delete characters until we are at or before want_vcol */
+  	    while (vcol > want_vcol
+  		    && (cc = *(ml_get_cursor() - 1), vim_iswhite(cc)))
+! 	    {
+! 		dec_cursor();
+! 		getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
+! 		if (State & REPLACE_FLAG)
+! 		{
+! 		    /* Don't delete characters before the insert point when in
+! 		     * Replace mode */
+! 		    if (curwin->w_cursor.lnum != Insstart.lnum
+! 			    || curwin->w_cursor.col >= Insstart.col)
+! 		    {
+! #if 0	/* what was this for?  It causes problems when sw != ts. */
+! 			if (State == REPLACE && (int)vcol < want_vcol)
+! 			{
+! 			    (void)del_char(FALSE);
+! 			    extra = 2;	/* don't pop too much */
+! 			}
+! 			else
+! #endif
+! 			    replace_do_bs();
+! 		    }
+! 		}
+! 		else
+! 		    (void)del_char(FALSE);
+! 	    }
+  
+  	    /* insert extra spaces until we are at want_vcol */
+  	    while (vcol < want_vcol)
+--- 8461,8467 ----
+  	    /* delete characters until we are at or before want_vcol */
+  	    while (vcol > want_vcol
+  		    && (cc = *(ml_get_cursor() - 1), vim_iswhite(cc)))
+! 		ins_bs_one(&vcol);
+  
+  	    /* insert extra spaces until we are at want_vcol */
+  	    while (vcol < want_vcol)
+***************
+*** 8479,8500 ****
+  #endif
+  		{
+  		    ins_str((char_u *)" ");
+! 		    if ((State & REPLACE_FLAG) /* && extra <= 1 */)
+! 		    {
+! #if 0
+! 			if (extra)
+! 			    replace_push_off(NUL);
+! 			else
+! #endif
+! 			    replace_push(NUL);
+! 		    }
+! #if 0
+! 		    if (extra == 2)
+! 			extra = 1;
+! #endif
+  		}
+  		getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
+  	    }
+  	}
+  
+  	/*
+--- 8478,8493 ----
+  #endif
+  		{
+  		    ins_str((char_u *)" ");
+! 		    if ((State & REPLACE_FLAG))
+! 			replace_push(NUL);
+  		}
+  		getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
+  	    }
++ 
++ 	    /* If we are now back where we started delete one character.  Can
++ 	     * happen when using 'sts' and 'linebreak'. */
++ 	    if (vcol >= start_vcol)
++ 		ins_bs_one(&vcol);
+  	}
+  
+  	/*
+*** ../vim-7.1.174/src/version.c	Sun Dec  9 19:37:37 2007
+--- src/version.c	Sun Dec  9 20:24:11 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     175,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+215. Your mouse-clicking forearm rivals Popeye's.
+
+ /// Bram Moolenaar -- Bram at 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    ///




More information about the pkg-vim-maintainers mailing list