summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ex_docmd.c3
-rw-r--r--src/testdir/test_command_count.in8
-rw-r--r--src/testdir/test_command_count.ok2
-rw-r--r--src/version.c2
4 files changed, 13 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0c8123cbc..b37c6ed8c 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2133,12 +2133,13 @@ do_one_cmd(cmdlinep, sourcing,
if (ea.cmdidx != CMD_SIZE
#ifdef FEAT_USR_CMDS
&& ea.cmdidx != CMD_USER
+ && ea.cmdidx != CMD_USER_BUF
#endif
)
ea.addr_type = cmdnames[(int)ea.cmdidx].cmd_addr_type;
else
#ifdef FEAT_USR_CMDS
- if (ea.cmdidx != CMD_USER)
+ if (ea.cmdidx != CMD_USER && ea.cmdidx != CMD_USER_BUF)
#endif
ea.addr_type = ADDR_LINES;
/* ea.addr_type for user commands is set by find_ucmd */
diff --git a/src/testdir/test_command_count.in b/src/testdir/test_command_count.in
index cca178e5c..c71ae5a38 100644
--- a/src/testdir/test_command_count.in
+++ b/src/testdir/test_command_count.in
@@ -3,7 +3,7 @@ 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=% 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>)
:com -range -addr=loaded_buffers RangeLoadedBuffers :call add(g:lines, 'RangeLoadedBuffers '.<line1>.' '.<line2>)
@@ -42,6 +42,12 @@ STARTTEST
:%RangeTabs
:RangeTabsAll
:1tabonly
+:s/\n/\r\r\r\r\r/
+:2ma<
+:$-ma>
+:'<,'>RangeLines
+:com -range=% -buffer LocalRangeLines :call add(g:lines, 'LocalRangeLines '.<line1>.' '.<line2>)
+:'<,'>LocalRangeLines
:e! test.out
:call append(0, g:lines)
:w|qa!
diff --git a/src/testdir/test_command_count.ok b/src/testdir/test_command_count.ok
index 11e88b390..693a22d63 100644
--- a/src/testdir/test_command_count.ok
+++ b/src/testdir/test_command_count.ok
@@ -14,4 +14,6 @@ RangeBuffersAll 1 5
RangeTabs 2 5
RangeTabs 1 5
RangeTabsAll 1 5
+RangeLines 2 5
+LocalRangeLines 2 5
diff --git a/src/version.c b/src/version.c
index 2ca9502d1..9d06ab33f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 561,
+/**/
560,
/**/
559,