Kaynağa Gözat

Test `&buftype == 'terminal'` to detect a terminal buffer.

The `term://` prefix on the buffer name is Neovim-specific, but the
check of `&buftype` works for both Vim and Neovim.
Michael Henry 11 ay önce
ebeveyn
işleme
948e1b7b1e
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      plugin/bufexplorer.vim

+ 2 - 1
plugin/bufexplorer.vim

@@ -709,8 +709,9 @@ function! s:GetBufferInfo(bufnr)
             let name = "[No Name]"
         endif
 
+        let b.isterminal = getbufvar(b._bufnr, '&buftype') == 'terminal'
         " Filter out term:// buffers if g:bufExplorerShowTerminal is 0.
-        if !g:bufExplorerShowTerminal && name =~ '^term://'
+        if !g:bufExplorerShowTerminal && b.isterminal
             continue
         endif