Skip to content

Commit c736899

Browse files
committed
Always call custom compiler with Make prefix
1 parent d32ad34 commit c736899

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoload/dispatch.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,10 @@ function! s:compiler_complete(compiler, A, L, P) abort
354354
endfunction
355355

356356
function! dispatch#command_complete(A, L, P) abort
357-
if a:L =~# '\S\+\s\S\+\s'
357+
let len = matchend(a:L, '\S\+\s\+\S\+\s')
358+
if len >= 0 && len <= a:P
358359
let compiler = dispatch#compiler_for_program(matchstr(a:L, '\s\zs.*'))
359-
return s:compiler_complete(compiler, a:A, a:L, a:P)
360+
return s:compiler_complete(compiler, a:A, 'Make '.strpart(a:L, len), a:P-len+5)
360361
else
361362
let executables = []
362363
for dir in split($PATH, has('win32') ? ';' : ':')

0 commit comments

Comments
 (0)