Skip to content

Commit 058f0b4

Browse files
author
skywind3000
committed
use set bufhidden=delete when -hidden=0 is provided
1 parent a3968ef commit 058f0b4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ There can be some options before your `[cmd]`:
204204
| `-rows=num` | 0 | When using a horizontal split terminal, this value represents the height of terminal window. |
205205
| `-cols=num` | 0 | When using a vertical split terminal, this value represents the width of terminal window. |
206206
| `-focus=?` | 1 | set to `0` to prevent focus changing when `-mode=term` |
207-
| `-hidden=?` | `unset` | set to `1` to init `bufhidden` to `hide` for internal terminal, set to `0` to init `bufhidden` to `unload` |
207+
| `-hidden=?` | `unset` | set to `1` to init `bufhidden` to `hide` for internal terminal, set to `0` to init `bufhidden` to `delete` |
208208
| `-listed=?` | 1 | when using `-mode=term`, set to 0 to hide the terminal in the buffer list |
209209
| `-close` | `unset` | when using `-mode=term`, close the terminal automatically when terminal process is finished |
210210

plugin/asyncrun.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: skywind3000 (at) gmail.com, 2016-2022
44
" Homepage: https://github.com/skywind3000/asyncrun.vim
55
"
6-
" Last Modified: 2022/11/13 00:38
6+
" Last Modified: 2022/11/13 00:49
77
"
88
" Run shell command in background and output to quickfix:
99
" :AsyncRun[!] [options] {cmd} ...
@@ -1357,7 +1357,8 @@ function! s:terminal_init(opts)
13571357
endif
13581358
exec has('nvim')? 'startinsert' : ''
13591359
if has_key(a:opts, 'hidden')
1360-
exec 'setlocal bufhidden=' . (hidden? 'hide' : 'unload')
1360+
let remove = get(g:, 'asyncrun_term_hide', 'delete')
1361+
exec 'setlocal bufhidden=' . (hidden? 'hide' : remove)
13611362
endif
13621363
if exists('*win_getid')
13631364
let info.winid = win_getid()
@@ -2107,7 +2108,7 @@ endfunc
21072108
" asyncrun - version
21082109
"----------------------------------------------------------------------
21092110
function! asyncrun#version()
2110-
return '2.11.0'
2111+
return '2.11.1'
21112112
endfunc
21122113

21132114

0 commit comments

Comments
 (0)