Hi,

Since v7.3.1270, 'undo' does not work correctly under certain conditions.

vim -N -u NONE
:put ='aaa'
u

expected: buffer empties, and it is an 'oldest change'
actual: 'aaa' remains at line 1, and it is an 'oldest change' ( i cannot undo 
any more )

I propose the attached fixes.

Regards,
Ozaki

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


diff --git a/src/ops.c b/src/ops.c
--- a/src/ops.c
+++ b/src/ops.c
@@ -3499,7 +3499,7 @@
 	    ++lnum;
 	/* In an empty buffer the empty line is going to be replaced, include
 	 * it in the saved lines. */
-	if ((bufempty() ? u_save(0, 1) : u_save(lnum - 1, lnum)) == FAIL)
+	if ((bufempty() ? u_save(0, 2) : u_save(lnum - 1, lnum)) == FAIL)
 	    goto end;
 #ifdef FEAT_FOLDING
 	if (dir == FORWARD)

Raspunde prin e-mail lui