diff options
| author | Felipe Morales <hel.sheep@gmail.com> | 2015-01-20 00:28:37 -0300 |
|---|---|---|
| committer | Felipe Morales <hel.sheep@gmail.com> | 2015-04-28 23:08:31 -0300 |
| commit | ca883df007d7644a0ff4986d564ee8524f88c86b (patch) | |
| tree | f808962165d66891c8d1ba5ba3a3afc23f79c4b4 /src/nvim/testdir/test_command_count.in | |
| parent | d2ad709a1e8eb9674e2744015cb609e941ea78f1 (diff) | |
| download | rneovim-ca883df007d7644a0ff4986d564ee8524f88c86b.tar.gz rneovim-ca883df007d7644a0ff4986d564ee8524f88c86b.tar.bz2 rneovim-ca883df007d7644a0ff4986d564ee8524f88c86b.zip | |
vim-patch:7.4.565
Problem: Ranges for arguments, buffers, tabs, etc. are not checked to
be valid but limited to the maximum. This can cause the
wrong
thing to happen.
Solution: Give an error for an invalid value. (Marcin Szamotulski)
Use windows range for ":wincmd".
https://code.google.com/p/vim/source/detail?r=v7-4-565
Diffstat (limited to 'src/nvim/testdir/test_command_count.in')
| -rw-r--r-- | src/nvim/testdir/test_command_count.in | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_command_count.in b/src/nvim/testdir/test_command_count.in index c71ae5a386..e7dadd2bed 100644 --- a/src/nvim/testdir/test_command_count.in +++ b/src/nvim/testdir/test_command_count.in @@ -1,8 +1,8 @@ Test for user command counts vim: set ft=vim : STARTTEST -:let g:lines = [] :so tiny.vim +:let g:lines = [] :com -range=% RangeLines :call add(g:lines, 'RangeLines '.<line1>.' '.<line2>) :com -range -addr=arguments RangeArguments :call add(g:lines, 'RangeArguments '.<line1>.' '.<line2>) :com -range=% -addr=arguments RangeArgumentsAll :call add(g:lines, 'RangeArgumentsAll '.<line1>.' '.<line2>) @@ -48,6 +48,46 @@ STARTTEST :'<,'>RangeLines :com -range=% -buffer LocalRangeLines :call add(g:lines, 'LocalRangeLines '.<line1>.' '.<line2>) :'<,'>LocalRangeLines +:b1 +ENDTEST + +STARTTEST +:call add(g:lines, '') +:%argd +:arga a b c d +:let v:errmsg = '' +:5argu +:call add(g:lines, '5argu ' . v:errmsg) +:$argu +:call add(g:lines, '4argu ' . expand('%:t')) +:let v:errmsg = '' +:1argu +:call add(g:lines, '1argu ' . expand('%:t')) +:let v:errmsg = '' +:100b +:call add(g:lines, '100b ' . v:errmsg) +:split|split|split|split +:let v:errmsg = '' +:0close +:call add(g:lines, '0close ' . v:errmsg) +:$wincmd w +:$close +:call add(g:lines, '$close ' . winnr()) +:let v:errmsg = '' +:$+close +:call add(g:lines, '$+close ' . v:errmsg) +:$tabe +:call add(g:lines, '$tabe ' . tabpagenr()) +:let v:errmsg = '' +:$+tabe +:call add(g:lines, '$+tabe ' . v:errmsg) +:only! +:e x +:0tabm +:normal 1gt +:call add(g:lines, '0tabm ' . expand('%:t')) +:tabonly! +:only! :e! test.out :call append(0, g:lines) :w|qa! |