Эх сурвалжийг харах

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 сар өмнө
parent
commit
948e1b7b1e

+ 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