Mercurial > vim
diff src/testdir/test_command_count.in @ 6474:a88d4dc02bf4 v7.4.566
updated for version 7.4.566
Problem: :argdo, :bufdo, :windo and :tabdo don't take a range.
Solution: Support the range. (Marcin Szamotulski)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 07 Jan 2015 16:54:21 +0100 |
parents | 22f95a018b13 |
children | 79b3d83592c5 |
line wrap: on
line diff
--- a/src/testdir/test_command_count.in +++ b/src/testdir/test_command_count.in @@ -90,6 +90,40 @@ STARTTEST :only! :e! test.out :call append(0, g:lines) +:unlet g:lines +:w|bd +:se hidden +:b1 +ENDTEST + +STARTTEST +:only! +:let g:lines = [] +:%argd +:arga a b c d e f +:3argu +:let args = '' +:.,$-argdo let args .= ' '.expand('%') +:call add(g:lines, 'argdo:' . args) +:split|split|split|split +:2wincmd w +:let windows = '' +:.,$-windo let windows .= ' '.winnr() +:call add(g:lines, 'windo:'. windows) +:b2 +:let buffers = '' +:.,$-bufdo let buffers .= ' '.bufnr('%') +:call add(g:lines, 'bufdo:' . buffers) +:let buffers = '' +:3,7bufdo let buffers .= ' '.bufnr('%') +:call add(g:lines, 'bufdo:' . buffers) +:tabe|tabe|tabe|tabe +:normal! 2gt +:let tabpages = '' +:.,$-tabdo let tabpages .= ' '.tabpagenr() +:call add(g:lines, 'tabdo:' . tabpages) +:e! test.out +:call append('$', g:lines) :w|qa! ENDTEST