commit 18c28098f8b165fc812739625d4838256ccc58a3
parent 4bf51a1ccc8317267ef3659b3e3653497b7e964b
Author: Daniel Moch <daniel@danielmoch.com>
Date: Mon, 3 Dec 2018 19:56:14 -0500
Fix mapping error
Closes #22
Closes #23
Closes #24
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/plugin/makejob.vim b/plugin/makejob.vim
@@ -91,11 +91,11 @@ function! s:JobHandler(channel) abort
let l:qfcmd = l:job['grepadd'] ? 'caddbuffer' : 'cgetbuffer'
endif
+ silent execute l:qfcmd.' '.l:job['outbufnr']
if !empty(l:outbuf) && l:job['outbufhidden'] == 0
call win_gotoid(l:outbuf[0])
silent execute 'close'
endif
- silent execute l:qfcmd.' '.l:job['outbufnr']
if l:lmake
call win_gotoid(l:curwinid)
call setloclist(0, [], 'a', {'title':l:job['prog']})
@@ -150,8 +150,9 @@ function! s:CreateMakeJobBuffer(prog, lmake)
let l:bufnum = winbufnr(0)
if g:makejob_hide_preview_window
hide
- end
- execute l:curwinnr.'wincmd w'
+ else
+ execute l:curwinnr.'wincmd w'
+ endif
return l:bufnum
endfunction