Skip to content

Commit f947a2e

Browse files
author
skywind3000
committed
-reuse=0 can be used in split terminal
1 parent ccd83bd commit f947a2e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

plugin/asyncrun.vim

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016, 2017, 2018, 2019, 2020
44
" Homepage: http://www.vim.org/scripts/script.php?script_id=5431
55
"
6-
" Last Modified: 2020/03/22 15:54
6+
" Last Modified: 2020/03/22 16:00
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1246,9 +1246,6 @@ function! s:start_in_terminal(opts)
12461246
endif
12471247
endif
12481248
endif
1249-
if get(a:opts, 'reuse', 1) == 0
1250-
let avail = -1
1251-
endif
12521249
endfor
12531250
let focus = get(a:opts, 'focus', 1)
12541251
if pos ==? 'tab'
@@ -1307,7 +1304,7 @@ function! s:start_in_terminal(opts)
13071304
keepalt noautocmd windo call s:save_restore_view(0)
13081305
keepalt noautocmd call win_gotoid(uid)
13091306
let origin = win_getid()
1310-
if avail < 0
1307+
if avail < 0 || get(a:opts, 'reuse', 1) == 0
13111308
let rows = get(a:opts, 'rows', '')
13121309
let cols = get(a:opts, 'cols', '')
13131310
if pos == 'top'

0 commit comments

Comments
 (0)