1
0
forked from aniani/vim

Included patch for persistent undo. Lots of changes and added test.

This commit is contained in:
Bram Moolenaar
2010-05-23 23:34:36 +02:00
parent c39125d7c4
commit 55debbe384
34 changed files with 1232 additions and 97 deletions

View File

@@ -69,7 +69,7 @@ test1.out: test1.in
fi \
else echo $* NO OUTPUT >>test.log; \
fi"
#-rm -rf X* test.ok viminfo
-rm -rf X* test.ok viminfo
test49.out: test49.vim

View File

@@ -50,6 +50,53 @@ obbbbu:.w >>test.out
obbbb:set ul=100
:undojoin
occccu:.w >>test.out
:"
:" Test 'undofile': first a simple one-line change.
:set nocp ul=100 undofile
:e! Xtestfile
ggdGithis is one line:set ul=100
:s/one/ONE/
:set ul=100
:w
:bwipe!
:e Xtestfile
u:.w >>test.out
:"
:" Test 'undofile', change in original file fails check
:set noundofile
:e! Xtestfile
:s/line/Line/
:w
:set undofile
:bwipe!
:e Xtestfile
u:.w >>test.out
:"
:" Test 'undofile', add 10 lines, delete 6 lines, undo 3
:set undofile
ggdGione
two
three
four
five
six
seven
eight
nine
ten:set ul=100
3Gdd:set ul=100
dd:set ul=100
dd:set ul=100
dd:set ul=100
dd:set ul=100
dd:set ul=100
:w
:bwipe!
:e Xtestfile
uuu:w >>test.out
:"
:" Rename the undo file so that it gets cleaned up.
:call rename(".Xtestfile.un~", "Xtestundo")
:qa!
ENDTEST

View File

@@ -22,3 +22,12 @@
123456abc
aaaa
aaaa
this is one line
this is ONE Line
one
two
six
seven
eight
nine
ten