diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-08-11 14:26:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-08-11 14:26:19 +0200 |
commit | dbd24b59678dd976b2ad356451e248a6e8b8bd8b (patch) | |
tree | 0ecfb9bb16fceefa3d1d101a8bb9cfe9db2e55f2 /src/testdir/test_charsearch.in | |
parent | fbd302ff38624abdec64980f4a19379d20a6e6c6 (diff) | |
download | vim-git-dbd24b59678dd976b2ad356451e248a6e8b8bd8b.tar.gz |
patch 7.4.813v7.4.813
Problem: It is not possible to save and restore character search state.
Solution: Add getcharsearch() and setcharsearch(). (James McCoy)
Diffstat (limited to 'src/testdir/test_charsearch.in')
-rw-r--r-- | src/testdir/test_charsearch.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test_charsearch.in b/src/testdir/test_charsearch.in new file mode 100644 index 000000000..5085cb39b --- /dev/null +++ b/src/testdir/test_charsearch.in @@ -0,0 +1,25 @@ +Test for character searches + +STARTTEST +:so small.vim +:" check that "fe" and ";" work +/^X +ylfep;;p,,p: +:" check that save/restore works +/^Y +ylfep:let csave = getcharsearch() +fip:call setcharsearch(csave) +;p;p: +:" check that setcharsearch() changes the settins. +/^Z +ylfep:call setcharsearch({'char': 'k'}) +;p:call setcharsearch({'forward': 0}) +$;p:call setcharseearch({'until'}: 1}) +;;p: +:/^X/,$w! test.out +:qa! +ENDTEST + +Xabcdefghijkemnopqretuvwxyz +Yabcdefghijkemnopqretuvwxyz +Zabcdefghijkemnokqretkvwxyz |