From c3fce3529c5a9d2f0afb97fa76d9f7442c335fcd Mon Sep 17 00:00:00 2001 From: amu507 Date: Thu, 31 Aug 2017 15:36:55 +0800 Subject: [PATCH] fix bug --- plugin/minibufexpl.vim | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) mode change 100644 => 100755 plugin/minibufexpl.vim diff --git a/plugin/minibufexpl.vim b/plugin/minibufexpl.vim old mode 100644 new mode 100755 index e2b3348..3fe4083 --- a/plugin/minibufexpl.vim +++ b/plugin/minibufexpl.vim @@ -99,6 +99,9 @@ endif if !exists(':MBEbun') command! -bang -nargs=* MBEbun call DeleteBuffer(2,''=='!',) endif +if !exists(':MBEup') + command! -nargs=* MBEup call UpdateExplorer(bufnr("%")) +endif " }}} " @@ -1389,7 +1392,9 @@ function! DeleteBuffer(action,bang,...) " Detach the buffer from all the windows that holding it " in every tab page. + let iCurTab=tabpagenr() tabdo call DetachBuffer(l:bufNum) + execute("tabn " . iCurTab) " Find which buffer is in the active window now if l:actBuf == l:bufNum @@ -1509,7 +1514,12 @@ function! BuildBufferList(curBufNum) let l:maxTabWidth = 0 " Loop through every buffer less than the total number of buffers. + "only show bufs in tabpage + let l:lstTabBuf=GetTabBufs() for l:i in s:BufList + if g:minibuf_limit_tab==#1 && index(l:lstTabBuf,l:i)==-1 + continue + endif let l:BufName = expand( "#" . l:i . ":p:t") " Establish the tab's content, including the differentiating root @@ -1541,7 +1551,10 @@ function! BuildBufferList(curBufNum) call add(l:tabList, l:tab) endfor - + + if !exists('t:miniBufExplSortBy') + let t:miniBufExplSortBy = g:miniBufExplSortBy + endif if t:miniBufExplSortBy == "name" call sort(l:tabList, "NameCmp") elseif t:miniBufExplSortBy == "mru"