Skip to content

Commit bbbdd2b

Browse files
committed
Add ability to specify autoclose parameter for floaterm
Closes #272.
1 parent 80750a8 commit bbbdd2b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/asyncrun/runner/floaterm.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"======================================================================
22
"
3-
" floaterm.vim -
3+
" floaterm.vim -
44
"
55
" Created by skywind on 2021/12/15
6-
" Last Modified: 2021/12/15 06:47:18
6+
" Last Modified: 2023/03/17 12:26:25
77
"
88
"======================================================================
99

@@ -34,7 +34,7 @@ function! asyncrun#runner#floaterm#run(opts)
3434
endif
3535
let cmd = 'FloatermNew '
3636
let cmd .= ' --wintype=float'
37-
if has_key(a:opts, 'position')
37+
if has_key(a:opts, 'position')
3838
let cmd .= ' --position=' . fnameescape(a:opts.position)
3939
endif
4040
if has_key(a:opts, 'width')
@@ -46,7 +46,7 @@ function! asyncrun#runner#floaterm#run(opts)
4646
if has_key(a:opts, 'title')
4747
let cmd .= ' --title=' . fnameescape(a:opts.title)
4848
endif
49-
let cmd .= ' --autoclose=0'
49+
let cmd .= ' --autoclose=' . get(a:opts, 'autoclose', 0)
5050
let cmd .= ' --silent=' . get(a:opts, 'silent', 0)
5151
let cwd = (a:opts.cwd == '')? getcwd() : (a:opts.cwd)
5252
let cmd .= ' --cwd=' . fnameescape(cwd)

0 commit comments

Comments
 (0)