forked from aniani/vim
updated for version 7.4.542
Problem: Using a range for window and buffer commands has a few problems.
Cannot specify the type of range for a user command.
Solution: Add the -addr argument for user commands. Fix problems. (Marcin
Szamotulski)
This commit is contained in:
@@ -41,6 +41,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
|
||||
test_breakindent.out \
|
||||
test_changelist.out \
|
||||
test_close_count.out \
|
||||
test_command_count.out \
|
||||
test_eval.out \
|
||||
test_insertcount.out \
|
||||
test_listlbr.out \
|
||||
@@ -178,6 +179,7 @@ test_autoformat_join.out: test_autoformat_join.in
|
||||
test_breakindent.out: test_breakindent.in
|
||||
test_changelist.out: test_changelist.in
|
||||
test_close_count.out: test_close_count.in
|
||||
test_command_count.out: test_command_count.in
|
||||
test_eval.out: test_eval.in
|
||||
test_insertcount.out: test_insertcount.in
|
||||
test_listlbr.out: test_listlbr.in
|
||||
|
||||
@@ -40,6 +40,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
|
||||
test_breakindent.out \
|
||||
test_changelist.out \
|
||||
test_close_count.out \
|
||||
test_command_count.out \
|
||||
test_eval.out \
|
||||
test_insertcount.out \
|
||||
test_listlbr.out \
|
||||
|
||||
@@ -62,6 +62,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
|
||||
test_breakindent.out \
|
||||
test_changelist.out \
|
||||
test_close_count.out \
|
||||
test_command_count.out \
|
||||
test_eval.out \
|
||||
test_insertcount.out \
|
||||
test_listlbr.out \
|
||||
|
||||
@@ -42,6 +42,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
|
||||
test_breakindent.out \
|
||||
test_changelist.out \
|
||||
test_close_count.out \
|
||||
test_command_count.out \
|
||||
test_eval.out \
|
||||
test_insertcount.out \
|
||||
test_listlbr.out \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
||||
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
||||
#
|
||||
# Last change: 2014 Nov 27
|
||||
# Last change: 2014 Dec 08
|
||||
#
|
||||
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
|
||||
# Edit the lines in the Configuration section below to select.
|
||||
@@ -101,6 +101,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
|
||||
test_breakindent.out \
|
||||
test_changelist.out \
|
||||
test_close_count.out \
|
||||
test_command_count.out \
|
||||
test_eval.out \
|
||||
test_insertcount.out \
|
||||
test_listlbr.out \
|
||||
|
||||
@@ -38,6 +38,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
|
||||
test_breakindent.out \
|
||||
test_changelist.out \
|
||||
test_close_count.out \
|
||||
test_command_count.out \
|
||||
test_eval.out \
|
||||
test_insertcount.out \
|
||||
test_listlbr.out \
|
||||
|
||||
50
src/testdir/test_command_count.in
Normal file
50
src/testdir/test_command_count.in
Normal file
@@ -0,0 +1,50 @@
|
||||
Test for user command counts vim: set ft=vim :
|
||||
|
||||
STARTTEST
|
||||
:let g:lines = []
|
||||
:so tiny.vim
|
||||
:com -range RangeLines :call add(g:lines, 'Rangeg:Lines '.<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>)
|
||||
:com -range -addr=loaded_buffers RangeLoadedBuffers :call add(g:lines, 'RangeLoadedBuffers '.<line1>.' '.<line2>)
|
||||
:com -range=% -addr=loaded_buffers RangeLoadedBuffersAll :call add(g:lines, 'RangeLoadedBuffersAll '.<line1>.' '.<line2>)
|
||||
:com -range -addr=buffers RangeBuffers :call add(g:lines, 'RangeBuffers '.<line1>.' '.<line2>)
|
||||
:com -range=% -addr=buffers RangeBuffersAll :call add(g:lines, 'RangeBuffersAll '.<line1>.' '.<line2>)
|
||||
:com -range -addr=windows RangeWindows :call add(g:lines, 'RangeWindows '.<line1>.' '.<line2>)
|
||||
:com -range=% -addr=windows RangeWindowsAll :call add(g:lines, 'RangeWindowsAll '.<line1>.' '.<line2>)
|
||||
:com -range -addr=tabs RangeTabs :call add(g:lines, 'RangeTabs '.<line1>.' '.<line2>)
|
||||
:com -range=% -addr=tabs RangeTabsAll :call add(g:lines, 'RangeTabsAll '.<line1>.' '.<line2>)
|
||||
:set hidden
|
||||
:arga a b c d
|
||||
:argdo echo "loading buffers"
|
||||
:argu 3
|
||||
:.-,$-RangeArguments
|
||||
:%RangeArguments
|
||||
:RangeArgumentsAll
|
||||
:N
|
||||
:.RangeArguments
|
||||
:split|split|split|split
|
||||
:3wincmd w
|
||||
:.,$RangeWindows
|
||||
:%RangeWindows
|
||||
:RangeWindowsAll
|
||||
:only
|
||||
:blast|bd
|
||||
:.,$RangeLoadedBuffers
|
||||
:%RangeLoadedBuffers
|
||||
:RangeLoadedBuffersAll
|
||||
:.,$RangeBuffers
|
||||
:%RangeBuffers
|
||||
:RangeBuffersAll
|
||||
:tabe|tabe|tabe|tabe
|
||||
:normal 2gt
|
||||
:.,$RangeTabs
|
||||
:%RangeTabs
|
||||
:RangeTabsAll
|
||||
:1tabonly
|
||||
:e! test.out
|
||||
:call append(0, g:lines)
|
||||
:w|qa!
|
||||
ENDTEST
|
||||
|
||||
|
||||
17
src/testdir/test_command_count.ok
Normal file
17
src/testdir/test_command_count.ok
Normal file
@@ -0,0 +1,17 @@
|
||||
RangeArguments 2 4
|
||||
RangeArguments 1 5
|
||||
RangeArgumentsAll 1 5
|
||||
RangeArguments 2 2
|
||||
RangeWindows 3 5
|
||||
RangeWindows 1 5
|
||||
RangeWindowsAll 1 5
|
||||
RangeLoadedBuffers 2 4
|
||||
RangeLoadedBuffers 1 4
|
||||
RangeLoadedBuffersAll 1 4
|
||||
RangeBuffers 2 5
|
||||
RangeBuffers 1 5
|
||||
RangeBuffersAll 1 5
|
||||
RangeTabs 2 5
|
||||
RangeTabs 1 5
|
||||
RangeTabsAll 1 5
|
||||
|
||||
Reference in New Issue
Block a user