|
|
@@ -112,6 +112,8 @@ let s:sort_by = ["number", "name", "fullpath", "mru", "extension"]
|
|
|
let s:splitMode = ""
|
|
|
let s:tabSpace = []
|
|
|
let s:types = {"fullname": ':p', "path": ':p:h', "relativename": ':~:.', "relativepath": ':~:.:h', "shortname": ':t'}
|
|
|
+let s:altBufferOnEntry = ""
|
|
|
+let s:activeBufferOnEntry = ""
|
|
|
|
|
|
" Setup the autocommands that handle the MRUList and other stuff. {{{2
|
|
|
autocmd VimEnter * call s:Setup()
|
|
|
@@ -683,6 +685,12 @@ function! s:BuildBufferList()
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
+ if buf.attributes =~ "%"
|
|
|
+ let s:activeBufferOnEntry = matchstr(buf.attributes, '[0-9]\+')
|
|
|
+ elseif buf.attributes =~ "#"
|
|
|
+ let s:altBufferOnEntry = matchstr(buf.attributes, '[0-9]\+')
|
|
|
+ endif
|
|
|
+
|
|
|
let line = buf.attributes." "
|
|
|
|
|
|
" Are we to split the path and file name?
|
|
|
@@ -916,9 +924,8 @@ function! s:Close()
|
|
|
else
|
|
|
" Since there are buffers left to switch to, swith to the previous and
|
|
|
" then the current.
|
|
|
- for b in reverse(listed[0:1])
|
|
|
- execute "keepjumps silent b ".b
|
|
|
- endfor
|
|
|
+ execute "keepjumps silent b ".s:altBufferOnEntry
|
|
|
+ execute "keepjumps silent b ".s:activeBufferOnEntry
|
|
|
endif
|
|
|
|
|
|
" Clear any messages.
|