patch 9.0.1555: setcharsearch() does not clear last searched char properly
Problem: setcharsearch() does not clear last searched char properly.
Solution: Do not accept lastc_bytelen smaller than one. (closes #12398)
diff --git a/src/testdir/test_charsearch.vim b/src/testdir/test_charsearch.vim
index 142e6c8..9b7c9a0 100644
--- a/src/testdir/test_charsearch.vim
+++ b/src/testdir/test_charsearch.vim
@@ -38,6 +38,8 @@
" clear the character search
call setcharsearch({'char' : ''})
call assert_equal('', getcharsearch().char)
+ call assert_beeps('normal ;')
+ call assert_beeps('normal ,')
call assert_fails("call setcharsearch([])", 'E1206:')
enew!