-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Before reporting
-
Please make sure you have searched through the F.A.Q. first.
-
Please make sure you are using the latest version of this plugin.
-
It's better to use English as it's more friendly to other non-Chinese native users.
Environment
If you are using neovim, just run :checkhealth floaterm and post the content
below.
- Platform: Darwin
- Nvim: NVIM v0.11.0
- Plugin: 4e28c8dConfigurations related to vim-floaterm in vimrc(i.e. g:floaterm_xxx):
g:floaterm_autocloseDescribe your question, feature request, or bug.
I am setting my wrapper function by calling floaterm#new and the autoclose=0 param is useless if set on_exit in jobopts due to the hardcode logic.
Steps to reproduce
Using the minimal vimrc
set nocompatible
set hidden
set termguicolors
set runtimepath^=~/.vim/bundle/vim-floaterm
filetype plugin indent on
syntax on
function Cb(...)
echom 123
endfunction
function Test()
" it's working as expected
call floaterm#new(0, 'echo 111', {}, { 'autoclose': 0 })
" it's not working
call floaterm#new(0, 'echo 111', { 'on_exit': function('Cb') }, { 'autoclose': 0 })
endfunctionSteps to reproduce the behavior:
Actual behaviour
always close the terminal buffer
Expected behaviour
do not close the terminal buffer if the autoclose = 0
probably solution is
if (autoclose == 1 && (a:data == 0 || (a:callback isnot v:null))) || (autoclose == 2)Screenshots(Optional, GIF is better)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels