mirror of
https://github.com/neovim/neovim.git
synced 2026-08-21 14:51:10 +00:00
patch 7.4.813 Problem: It is not possible to save and restore character search state. Solution: Add getcharsearch() and setcharsearch(). (James McCoy) https://github.com/vim/vim/releases/tag/v7.4.813 https://github.com/vim/vim/releases/tag/v7.4.826 Signed-off-by: James McCoy <vega.james@gmail.com>
26 lines
503 B
Plaintext
26 lines
503 B
Plaintext
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
|