Skip to content

Commit 40854cc

Browse files
committed
Add potential future alternatives to <lnum>
<line1> and <line2> are used by Vim in command definitions, and would probably be a better alternative to inventing our own <lnum>.
1 parent 2a6aad6 commit 40854cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/dispatch.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ function! dispatch#compile_command(bang, args, count) abort
447447
endif
448448
let request.format = substitute(request.format, ',%-G%\.%#\%($\|,\@=\)', '', '')
449449
if a:count
450-
let request.command = substitute(request.command, '<lnum>'.s:flags, '\=fnamemodify(a:count, submatch(0)[6:-1])', 'g')
450+
let request.command = substitute(request.command, '<\%(lnum\|line1\|line2\)>'.s:flags, '\=fnamemodify(a:count, submatch(0)[6:-1])', 'g')
451451
else
452-
let request.command = substitute(request.command, '<lnum>'.s:flags, '', 'g')
452+
let request.command = substitute(request.command, '<\%(lnum\|line1\|line2\)>'.s:flags, '', 'g')
453453
endif
454454

455455
if empty(request.compiler)

0 commit comments

Comments
 (0)