voldikss / vim-floaterm

:computer: Terminal manager for (neo)vim
MIT License
2.47k stars 78 forks source link

Feature request: ensure to destroy terminal float window when terminal buffer is deleted #315

Open oblitum opened 3 years ago

oblitum commented 3 years ago

I'm using autocmd init TermClose * exec 'bd! ' . expand('<abuf>') to auto delete terminal buffers when they exit (see https://github.com/neovim/neovim/issues/14986 for more info).

This isn't working great with vim-floaterm because the terminal gets delete but the floating window is left behind empty.

voldikss commented 3 years ago

I just looked into this but it's a little hard. After deleting the terminal buffer using autocmd init TermClose * exec 'bd! ' . expand('<abuf>'), the bufnr still exists but the b: variables got lost.

Maybe putting floaterm related variables into the floaterm buffer scope is not a good behavior. Will look into this again when I have enough time to refactor the plugin.

adigitoleo commented 2 years ago

I suspect it is the border window that is hanging around. For neovim > 0.5 this might be solved by #343. @oblitum Could you try that PR and see if it works?

sisrfeng commented 1 year ago

+1 for similar problem with the plugin

plug 'https://github.com/sisrfeng/sk'
    plug 'https://github.com/sisrfeng/skim' ,
          \ {
           \ 'dir': $LEO_TOOL . '/skim',
           \ 'do': './install',
          \ }

image