0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.1.1822: confusing error message when range is not allowed

Problem:    Confusing error message when range is not allowed.
Solution:   With ADDR_NONE give e_norange.  Change e_invaddr to e_invrange for
            consistency.
This commit is contained in:
Bram Moolenaar
2019-08-06 21:29:29 +02:00
parent f97d46f816
commit 0acae7acc4
4 changed files with 30 additions and 9 deletions

View File

@@ -8,3 +8,14 @@ func Test_ex_delete()
.dl
call assert_equal(['a', 'c'], getline(1, 2))
endfunc
func Test_range_error()
call assert_fails(':.echo 1', 'E481:')
call assert_fails(':$echo 1', 'E481:')
call assert_fails(':1,2echo 1', 'E481:')
call assert_fails(':+1echo 1', 'E481:')
call assert_fails(':/1/echo 1', 'E481:')
call assert_fails(':\/echo 1', 'E481:')
normal vv
call assert_fails(":'<,'>echo 1", 'E481:')
endfunc