Skip to content

Commit

Permalink
Properly expand special characters in makeprg
Browse files Browse the repository at this point in the history
Closes #7
  • Loading branch information
djmoch committed Dec 5, 2016
1 parent 418b222 commit bef91c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugin/makejob.vim
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,18 @@ function! s:CreateMakeJobWindow(prog)
return bufnum
endfunction

function! s:Expand(input)
let split_input = split(a:input)
let expanded_input = []
for token in split_input
let expanded_input += [expand(token)]
endfor
return join(expanded_input)
endfunction

function! s:MakeJob(grep, lmake, grepadd, bang, ...)
let make = a:grep ? &grepprg : &makeprg
let make = s:Expand(make)
let prog = split(make)[0]
let internal_grep = make ==# 'internal' ? 1 : 0
execute 'let openbufnr = bufnr("^'.prog.'$")'
Expand Down

0 comments on commit bef91c6

Please sign in to comment.