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!
diff --git a/src/testdir/test_charsearch_utf8.vim b/src/testdir/test_charsearch_utf8.vim
index 82a807a..843edbb 100644
--- a/src/testdir/test_charsearch_utf8.vim
+++ b/src/testdir/test_charsearch_utf8.vim
@@ -13,6 +13,13 @@
   call assert_equal([0, 1, 43, 0], getpos('.'))
   normal! ,
   call assert_equal([0, 1, 28, 0], getpos('.'))
+  call assert_equal('最', getcharsearch().char)
+  call setcharsearch({'char' : ''})
+  call assert_equal('', getcharsearch().char)
+  call assert_beeps('normal ;')
+  call assert_equal([0, 1, 28, 0], getpos('.'))
+  call assert_beeps('normal ,')
+  call assert_equal([0, 1, 28, 0], getpos('.'))
   bw!
 endfunc