Problem: Ex range handling is wrong for buffer-local user commands.
Solution: Check for CMD_USER_BUF. (Marcin Szamotulski)
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 */
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>)
:%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!
RangeTabs 2 5
RangeTabs 1 5
RangeTabsAll 1 5
+RangeLines 2 5
+LocalRangeLines 2 5
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 561,
/**/
560,
/**/