Mercurial > vim
comparison src/testdir/test_charsearch.in @ 6991:814f1f569e4a v7.4.813
patch 7.4.813
Problem: It is not possible to save and restore character search state.
Solution: Add getcharsearch() and setcharsearch(). (James McCoy)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Aug 2015 14:26:19 +0200 |
parents | |
children | dbfa0f9ab289 |
comparison
equal
deleted
inserted
replaced
6990:9c248be4e7d2 | 6991:814f1f569e4a |
---|---|
1 Test for character searches | |
2 | |
3 STARTTEST | |
4 :so small.vim | |
5 :" check that "fe" and ";" work | |
6 /^X | |
7 ylfep;;p,,p: | |
8 :" check that save/restore works | |
9 /^Y | |
10 ylfep:let csave = getcharsearch() | |
11 fip:call setcharsearch(csave) | |
12 ;p;p: | |
13 :" check that setcharsearch() changes the settins. | |
14 /^Z | |
15 ylfep:call setcharsearch({'char': 'k'}) | |
16 ;p:call setcharsearch({'forward': 0}) | |
17 $;p:call setcharseearch({'until'}: 1}) | |
18 ;;p: | |
19 :/^X/,$w! test.out | |
20 :qa! | |
21 ENDTEST | |
22 | |
23 Xabcdefghijkemnopqretuvwxyz | |
24 Yabcdefghijkemnopqretuvwxyz | |
25 Zabcdefghijkemnokqretkvwxyz |