patch 9.0.1378: illegal memory access when using virtual editing
Problem: Illegal memory access when using virtual editing.
Solution: Make sure "startspaces" is not negative.
diff --git a/src/testdir/test_virtualedit.vim b/src/testdir/test_virtualedit.vim
index 71cea42..edaae67 100644
--- a/src/testdir/test_virtualedit.vim
+++ b/src/testdir/test_virtualedit.vim
@@ -88,6 +88,16 @@
set virtualedit=
endfunc
+func Test_edit_special_char()
+ new
+ se ve=all
+ norm a0
+ sil! exe "norm o00000\<Nul>k<a0s"
+
+ bwipe!
+ set virtualedit=
+endfunc
+
" Tests for pasting at the beginning, end and middle of a tab character
" in virtual edit mode.
func Test_paste_in_tab()