59 lines · 1011 B · Text
RawDownload
Tests for undo tree.Since this script is sourced we need to explicitly break changes up inundo-able pieces.  Do that by setting 'undolevels'. STARTTEST:" Delete three characters and undoGx:set ul=100x:set ul=100x:.w! test.outg-:.w >>test.outg-:.w >>test.outg-:.w >>test.outg-:.w >>test.out:":/^111/w >>test.out:" Delete three other characters and go back in time step by step$x:set ul=100x:set ul=100x:.w >>test.out:sleep 1g-:.w >>test.outg-:.w >>test.outg-:.w >>test.outg-:.w >>test.outg-:.w >>test.outg-:.w >>test.outg-:.w >>test.outg-:.w >>test.out10g+:.w >>test.out:":/^222/w >>test.out:" Delay for three seconds and go some seconds forward and backward:sleep 2Aa:set ul=100Ab:set ul=100Ac:set ul=100:.w >>test.out:ear 1s:.w >>test.out:ear 3s:.w >>test.out:later 1s:.w >>test.out:later 1h:.w >>test.out:":" test undojoinGoaaaa:set ul=100obbbbu:.w >>test.outobbbb:set ul=100:undojoinoccccu:.w >>test.out:qa!ENDTEST 1111 -----2222 ----- 123456789

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t