]> granicus.if.org Git - vim/commitdiff
patch 7.4.1574 v7.4.1574
authorBram Moolenaar <Bram@vim.org>
Tue, 15 Mar 2016 16:43:55 +0000 (17:43 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 15 Mar 2016 16:43:55 +0000 (17:43 +0100)
Problem:    ":undo 0" does not work. (Florent Fayolle)
Solution:   Make it undo all the way. (closes #688)

src/testdir/test_alot.vim
src/testdir/test_undolevels.vim
src/undo.c
src/version.c

index 94ff8b1dac013b0fc33a0a074baa47a50d72db86..bd74afc4aa936bbcf8c805b73d3c09a904b1fc03 100644 (file)
@@ -4,6 +4,7 @@
 source test_assign.vim
 source test_cursor_func.vim
 source test_delete.vim
+source test_ex_undo.vim
 source test_expand.vim
 source test_feedkeys.vim
 source test_file_perm.vim
index 427cece24c2131499d36f6562ca33fbe9ec2e132..7bb25effb5297de599c81bc7ae4ca79266d3a417 100644 (file)
@@ -1,7 +1,5 @@
 " Tests for 'undolevels'
 
-set nocompatible viminfo+=nviminfo
-
 func FillBuffer()
   for i in range(1,13)
     put=i
index 2bf815ba456f30ad4cc2f6d362094b18aaba4557..07b278130783c05b1e162dd1975b1363d7870e3a 100644 (file)
@@ -2286,7 +2286,14 @@ undo_time(
      * Init "closest" to a value we can't reach. */
     if (absolute)
     {
-       target = step;
+       if (step == 0)
+       {
+           /* target 0 does not exist, got to 1 and above it. */
+           target = 1;
+           above = TRUE;
+       }
+       else
+           target = step;
        closest = -1;
     }
     else
index c3c932381a82f8818b07e12dee9e074295bea0e3..4779f7d876c9d23e43d36e1e6c6e5777edf89b32 100644 (file)
@@ -743,6 +743,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1574,
 /**/
     1573,
 /**/