vim-makejob

Minimal, asynchronous quickfix commands for Vim 8.0
git clone git://git.danielmoch.com/vim-makejob.git
Log | Files | Refs | README | LICENSE

commit 5c8d095fa51982e4607582f4a69b56a030373857
parent 67995da62205a716bc9b29ec5a7f2761fe4585b2
Author: Bakudankun <bakudankun@gmail.com>
Date:   Wed, 14 Feb 2018 19:38:29 +0900

Fix error while using with multiple tab pages

Closes #21

Diffstat:
Mplugin/makejob.vim | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugin/makejob.vim b/plugin/makejob.vim @@ -31,7 +31,7 @@ endfunction function! s:JobStop(...) abort if a:0 if bufexists(a:1) - execute bufwinnr(a:1).'wincmd w' + call win_gotoid(win_findbuf(bufnr(a:1))[0]) if exists('b:makejob') if !job_stop(b:makejob) echoerr 'Failed to stop current MakeJob' @@ -65,8 +65,8 @@ function! s:JobHandler(channel) abort let &errorformat = l:tempefm endif - let l:curwinnr = winnr() - execute bufwinnr(l:job['srcbufnr']).'wincmd w' + let l:curwinid = win_getid() + call win_gotoid(win_findbuf(l:job['srcbufnr'])[0]) let l:exitval = job_info(b:makejob).exitval unlet b:makejob nunmap <buffer> <C-c> @@ -87,7 +87,7 @@ function! s:JobHandler(channel) abort call setqflist([], 'a', {'title':l:job['prog']}) endif silent execute l:job['outbufnr'].'bwipe!' - execute l:curwinnr.'wincmd w' + call win_gotoid(l:curwinid) let l:initqf = l:job['lmake'] ? getloclist(bufwinnr( \ job['srcbufnr'])) : getqflist()