patch 8.2.1910: reading past the end of the command line
Problem: Reading past the end of the command line.
Solution: Check for NUL. (closes #7204)
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index 6a84b1c..de3e3a1 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1832,4 +1832,11 @@
bwipe!
endfunc
+func Test_read_invalid()
+ set encoding=latin1
+ " This was not properly checking for going past the end.
+ call assert_fails('r`=', 'E484')
+ set encoding=utf-8
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab