[vim/f17] - patchlevel 452

Karsten Hopp karsten at fedoraproject.org
Fri Mar 16 17:45:40 UTC 2012


commit 1d826f942e4af93e5e014590f267a8856ee7fb03
Author: Karsten Hopp <karsten at redhat.com>
Date:   Fri Mar 16 18:44:47 2012 +0100

    - patchlevel 452

 7.3.452 |   70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/7.3.452 b/7.3.452
new file mode 100644
index 0000000..295b2fe
--- /dev/null
+++ b/7.3.452
@@ -0,0 +1,70 @@
+To: vim_dev at googlegroups.com
+Subject: Patch 7.3.452
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.3.452
+Problem:    Undo broken when pasting close to the last line. (Andrey Radev)
+Solution:   Use a flag to remember if the deleted included the last line.
+	    (Christian Brabandt)
+Files:	    src/ops.c
+
+
+*** ../vim-7.3.451/src/ops.c	2012-01-10 13:46:18.000000000 +0100
+--- src/ops.c	2012-02-22 17:32:40.000000000 +0100
+***************
+*** 1943,1954 ****
+--- 1943,1956 ----
+  	else				/* delete characters between lines */
+  	{
+  	    pos_T   curpos;
++ 	    int     delete_last_line;
+  
+  	    /* save deleted and changed lines for undo */
+  	    if (u_save((linenr_T)(curwin->w_cursor.lnum - 1),
+  		 (linenr_T)(curwin->w_cursor.lnum + oap->line_count)) == FAIL)
+  		return FAIL;
+  
++ 	    delete_last_line = (oap->end.lnum == curbuf->b_ml.ml_line_count);
+  	    truncate_line(TRUE);	/* delete from cursor to end of line */
+  
+  	    curpos = curwin->w_cursor;	/* remember curwin->w_cursor */
+***************
+*** 1956,1962 ****
+  	    del_lines((long)(oap->line_count - 2), FALSE);
+  
+  	    n = (oap->end.col + 1 - !oap->inclusive);
+! 	    if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count
+  		    && n > (int)STRLEN(ml_get(oap->end.lnum)))
+  	    {
+  		/* Special case: gH<Del> deletes the last line. */
+--- 1958,1964 ----
+  	    del_lines((long)(oap->line_count - 2), FALSE);
+  
+  	    n = (oap->end.col + 1 - !oap->inclusive);
+! 	    if (oap->inclusive && delete_last_line
+  		    && n > (int)STRLEN(ml_get(oap->end.lnum)))
+  	    {
+  		/* Special case: gH<Del> deletes the last line. */
+*** ../vim-7.3.451/src/version.c	2012-02-22 16:01:53.000000000 +0100
+--- src/version.c	2012-02-22 17:37:18.000000000 +0100
+***************
+*** 716,717 ****
+--- 716,719 ----
+  {   /* Add new patch number below this line */
++ /**/
++     452,
+  /**/
+
+-- 
+From "know your smileys":
+ =):-)	Uncle Sam
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\  an exciting new programming language -- http://www.Zimbu.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


More information about the scm-commits mailing list