<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
-*bufexplorer.txt*              Buffer Explorer       Last Change: 02 Dec 2007
+*bufexplorer.txt*              Buffer Explorer       Last Change: 19 Nov 2008
 
 Buffer Explorer                                *buffer-explorer* *bufexplorer*
-                                Version 7.1.6
+                                Version 7.2.2
 
 Plugin for easily exploring (or browsing) Vim |:buffers|.
 
@@ -36,8 +36,11 @@ To install:
 USAGE                                                      *bufexplorer-usage*
 
 To start exploring in the current window, use: &gt;
-
  \be   OR  :BufExplorer
+To start exploring in a newly split horizontal window, use: &gt;
+ \bs  or  :HSBufExplorer
+To start exploring in a newly split vertical window, use: &gt;
+ \bv  or  :VSBufExplorer
 
 If you would like to use something other than '\', you may simply change the
 leader (see |mapleader|).
@@ -136,6 +139,14 @@ To control what field the buffers are sorted by, use: &gt;
   let g:bufExplorerSortBy='number'     &quot; Sort by the buffer's number.
 The default is to sort by mru.
 
+                                                      *g:bufExplorerSplitBelow*
+To control where the new split window will be placed above or below the
+current window, use: &gt;
+  let g:bufExplorerSplitBelow=1        &quot; Split new window below current.
+  let g:bufExplorerSplitBelow=0        &quot; Split new window above current.
+The default is to use what ever is set by the global &amp;splitbelow
+variable.
+
                                                 *g:bufExplorerSplitOutPathName*
 To control whether to split out the path and file name or not, use: &gt;
   let g:bufExplorerSplitOutPathName=1  &quot; Split the path and file name.
@@ -143,9 +154,37 @@ To control whether to split out the path and file name or not, use: &gt;
                                        &quot; name.
 The default is to split the path and file name.
 
+                                                      *g:bufExplorerSplitRight*
+To control where the new vsplit window will be placed to the left or right of
+current window, use: &gt;
+  let g:bufExplorerSplitRight=0        &quot; Split left.
+  let g:bufExplorerSplitRight=1        &quot; Split right.
+The default is to use the global &amp;splitright.
+
 ===============================================================================
 CHANGE LOG                                              *bufexplorer-changelog*
 
+7.2.2  - Fix:
+         * Thanks to David L. Dight for spotting and fixing an issue when
+           using ctrl^. bufexplorer would incorrectly handle the previous
+           buffer so that when ctrl^ was pressed the incorrect file was opened.
+7.2.1  - Fix:
+         * Thanks to Dimitar for spotting and fixing a feature that was
+           inadvertently left out of the previous version. The feature was
+           when bufexplorer was used together with WinManager, you could use
+           the tab key to open a buffer in a split window.
+7.2.0  - Enhancements:
+         * For all those missing the \bs and \bv commands, these have now
+           returned. Thanks to Phil O'Connell for asking for the return of
+           these missing features and helping test out this version.
+         Fixes:
+         * Fixed problem with the bufExplorerFindActive code not working
+           correctly.
+         * Fixed an incompatibility between bufexplorer and netrw that caused
+           buffers to be incorrectly removed from the MRU list.
+7.1.7  - Fixes:
+         * TaCahiroy fixed several issues related to opening a buffer in a
+           tab.
 7.1.6  - Fixes:
          * Removed ff=unix from modeline in bufexplorer.txt. Found by Bill
            McCarthy.
@@ -388,7 +427,6 @@ TODO                                                         *bufexplorer-todo*
 
 - The issuing of a ':bd' command does not always remove the buffer number from
   the MRU list.
-- Look into adding '\bs' (buffer split) command back into the code.
 
 ===============================================================================
 CREDITS                                                   *bufexplorer-credits*</diff>
      <filename>doc/bufexplorer.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 &quot;=============================================================================
-&quot;    Copyright: Copyright (C) 2001-2007 Jeff Lanzarotta
+&quot;    Copyright: Copyright (C) 2001-2008 Jeff Lanzarotta
 &quot;               Permission is hereby granted to use and distribute this code,
 &quot;               with or without modifications, provided that this copyright
 &quot;               notice is copied with it. Like anything else that's free,
@@ -10,7 +10,7 @@
 &quot; Name Of File: bufexplorer.vim
 &quot;  Description: Buffer Explorer Vim Plugin
 &quot;   Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com)
-&quot; Last Changed: Sunday, 02 December 2007
+&quot; Last Changed: Wednesday, 19 Nov 2008
 &quot;      Version: See g:bufexplorer_version for version number.
 &quot;        Usage: This file should reside in the plugin directory and be
 &quot;               automatically sourced.
@@ -18,10 +18,14 @@
 &quot;               You may use the default keymappings of
 &quot;
 &quot;                 &lt;Leader&gt;be  - Opens BufExplorer
+&quot;                 &lt;Leader&gt;bs  - Opens horizontally split window BufExplorer
+&quot;                 &lt;Leader&gt;bv  - Opens vertically split window BufExplorer
 &quot;
 &quot;               Or you can use
 &quot;
 &quot;                 &quot;:BufExplorer&quot; - Opens BufExplorer
+&quot;                 &quot;:HSBufExplorer&quot; - Opens horizontally window BufExplorer
+&quot;                 &quot;:VSBufExplorer&quot; - Opens vertically split window BufExplorer
 &quot;
 &quot;               For more help see supplied documentation.
 &quot;      History: See supplied documentation.
@@ -34,7 +38,7 @@ endif
 &quot;1}}}
 
 &quot; Version number
-let g:bufexplorer_version = &quot;7.1.6&quot;
+let g:bufexplorer_version = &quot;7.2.2&quot;
 
 &quot; Check for Vim version 700 or greater {{{1
 if v:version &lt; 700
@@ -44,9 +48,13 @@ endif
 
 &quot; Public Interface {{{1
 nmap &lt;silent&gt; &lt;unique&gt; &lt;Leader&gt;be :BufExplorer&lt;CR&gt;
+nmap &lt;silent&gt; &lt;unique&gt; &lt;Leader&gt;bs :HSBufExplorer&lt;CR&gt;
+nmap &lt;silent&gt; &lt;unique&gt; &lt;Leader&gt;bv :VSBufExplorer&lt;CR&gt;
 
 &quot; Create commands {{{1
 command BufExplorer :call StartBufExplorer(has (&quot;gui&quot;) ? &quot;drop&quot; : &quot;hide edit&quot;)
+command HSBufExplorer :call HorizontalSplitBufExplorer()
+command VSBufExplorer :call VerticalSplitBufExplorer()
 
 &quot; Set {{{1
 function s:Set(var, default)
@@ -62,18 +70,19 @@ function s:Set(var, default)
 
   return 0
 endfunction
-&quot;1}}}
 
 &quot; Default values {{{1
-call s:Set(&quot;g:bufExplorerDefaultHelp&quot;, 1) &quot; Show default help?
-call s:Set(&quot;g:bufExplorerDetailedHelp&quot;, 0) &quot; Show detailed help?
-call s:Set(&quot;g:bufExplorerFindActive&quot;, 1) &quot; When selecting an active buffer, take you to the window where it is active?
-call s:Set(&quot;g:bufExplorerReverseSort&quot;, 0) &quot; sort reverse?
-call s:Set(&quot;g:bufExplorerShowDirectories&quot;, 1) &quot; (Dir's are added by commands like ':e .')
-call s:Set(&quot;g:bufExplorerShowRelativePath&quot;, 0) &quot; Show listings with relative or absolute paths?
-call s:Set(&quot;g:bufExplorerShowUnlisted&quot;, 0) &quot; Show unlisted buffers?
-call s:Set(&quot;g:bufExplorerSortBy&quot;, &quot;mru&quot;) &quot; Sorting methods are in s:sort_by:
-call s:Set(&quot;g:bufExplorerSplitOutPathName&quot;, 1) &quot; Split out path and file name?
+call s:Set(&quot;g:bufExplorerDefaultHelp&quot;, 1)           &quot; Show default help?
+call s:Set(&quot;g:bufExplorerDetailedHelp&quot;, 0)          &quot; Show detailed help?
+call s:Set(&quot;g:bufExplorerFindActive&quot;, 1)            &quot; When selecting an active buffer, take you to the window where it is active?
+call s:Set(&quot;g:bufExplorerReverseSort&quot;, 0)           &quot; sort reverse?
+call s:Set(&quot;g:bufExplorerShowDirectories&quot;, 1)       &quot; (Dir's are added by commands like ':e .')
+call s:Set(&quot;g:bufExplorerShowRelativePath&quot;, 0)      &quot; Show listings with relative or absolute paths?
+call s:Set(&quot;g:bufExplorerShowUnlisted&quot;, 0)          &quot; Show unlisted buffers?
+call s:Set(&quot;g:bufExplorerSortBy&quot;, &quot;mru&quot;)            &quot; Sorting methods are in s:sort_by:
+call s:Set(&quot;g:bufExplorerSplitOutPathName&quot;, 1)      &quot; Split out path and file name?
+call s:Set(&quot;g:bufExplorerSplitRight&quot;, &amp;splitright)  &quot; Should vertical splits be on the right or left of current window?
+call s:Set(&quot;g:bufExplorerSplitBelow&quot;, &amp;splitbelow)  &quot; Should horizontal splits be below or above current window?
 
 &quot; Global variables {{{1
 let s:MRUList = []
@@ -81,17 +90,18 @@ let s:running = 0
 let s:sort_by = [&quot;number&quot;, &quot;name&quot;, &quot;fullpath&quot;, &quot;mru&quot;, &quot;extension&quot;]
 let s:tabSpace = []
 let s:types = {&quot;fullname&quot;: ':p', &quot;path&quot;: ':p:h', &quot;relativename&quot;: ':~:.', &quot;relativepath&quot;: ':~:.:h', &quot;shortname&quot;: ':t'}
+let s:originBuffer = 0
+let s:splitMode = &quot;&quot;
 
 &quot; Setup the autocommands that handle the MRUList and other stuff. {{{1
 autocmd VimEnter * call s:Setup()
 
 &quot; Setup {{{1
 function s:Setup()
-  &quot; Build initial MRUList.
+                                &quot; Build initial MRUList.
   let s:MRUList = range(1, bufnr('$'))
   let s:tabSpace = []
-
-  &quot; Now that the MRUList is created, add the other autocmds.
+                                &quot; Now that the MRUList is created, add the other autocmds.
   autocmd BufEnter,BufNew * call s:ActivateBuffer()
   autocmd BufWipeOut * call s:DeactivateBuffer(1)
   autocmd BufDelete * call s:DeactivateBuffer(0)
@@ -120,11 +130,16 @@ function s:DeactivateBuffer(remove)
   &quot;echom &quot;buffers:&quot; string(tabpagebuflist())
   &quot;echom &quot;MRU before:&quot; string(s:MRUList)
 
+  let _bufnr = bufnr(expand(&quot;&lt;afile&gt;&quot;))
+  let _buftype = getbufvar(_bufnr, &quot;&amp;buftype&quot;)
+
+  if empty(_buftype) || _buftype == &quot;nofile&quot; || !buflisted(_bufnr) || empty(bufname(_bufnr)) || fnamemodify(bufname(_bufnr), &quot;:t&quot;) == &quot;[BufExplorer]&quot;
+    return
+  end
+
   if a:remove
     call s:MRUPop(bufnr(expand(&quot;&lt;afile&gt;&quot;)))
   end
-
-  &quot;echom &quot;MRU after:&quot; string(s:MRUList)
 endfunction
 
 &quot; MRUPop {{{1
@@ -134,15 +149,16 @@ endfunction
 
 &quot; MRUPush {{{1
 function s:MRUPush(buf)
-  &quot; Skip temporary buffer with buftype set.
-  &quot; Don't add the BufExplorer window to the list.
+                                &quot; Skip temporary buffer with buftype set. Don't add the BufExplorer window to the
+                                &quot; list.
   if !empty(getbufvar(a:buf, &quot;&amp;buftype&quot;)) ||
       \ !buflisted(a:buf) || empty(bufname(a:buf)) ||
       \ fnamemodify(bufname(a:buf), &quot;:t&quot;) == &quot;[BufExplorer]&quot;
     return
   end
-
+                                &quot; Remove the buffer number from the list if it already exists.
   call s:MRUPop(a:buf)
+                                &quot; Add the buffer number to the head of the list.
   call insert(s:MRUList,a:buf)
 endfunction
 
@@ -182,22 +198,34 @@ function s:Cleanup()
   let &amp;report = s:_report
   let &amp;list = s:_list
   let s:running = 0
+  let s:splitMode = &quot;&quot;
 
   delmarks!
 endfunction
 
+&quot; HorizontalSplitBufExplorer {{{1
+function HorizontalSplitBufExplorer()
+  let s:splitMode = &quot;sp&quot;
+  exec &quot;BufExplorer&quot;
+endfunction
+
+&quot; VerticalSplitBufExplorer {{{1
+function VerticalSplitBufExplorer()
+  let s:splitMode = &quot;vsp&quot;
+  exec &quot;BufExplorer&quot;
+endfunction
+
 &quot; StartBufExplorer {{{1
 function StartBufExplorer(open)
   let name = '[BufExplorer]'
 
   if !has(&quot;win32&quot;)
-    &quot; On non-Windows boxes, escape the name so that is shows up correctly.
+                                &quot; On non-Windows boxes, escape the name so that is shows up correctly.
     let name = escape(name, &quot;[]&quot;)
   endif
-
-  &quot; Make sure there is only one explorer open at a time.
+                                &quot; Make sure there is only one explorer open at a time.
   if s:running == 1
-    &quot; Go to the open buffer.
+                                &quot; Go to the open buffer.
     if has(&quot;gui&quot;)
       exec &quot;drop&quot; name
     endif
@@ -205,6 +233,7 @@ function StartBufExplorer(open)
     return
   endif
 
+  let s:originBuffer = bufnr(&quot;%&quot;)
   silent let s:raw_buffer_listing = s:GetBufferInfo()
 
   let copy = copy(s:raw_buffer_listing)
@@ -219,14 +248,25 @@ function StartBufExplorer(open)
 
   if len(copy) &lt;= 1
     echo &quot;\r&quot;
-    call s:Warn(&quot;Sorry, there are no more buffers to explore&quot;)
+    call s:Warning(&quot;Sorry, there are no more buffers to explore&quot;)
 
     return
   endif
+                                &quot; We may have to split the current window.
+  if (s:splitMode != &quot;&quot;)
+                                &quot; Save off the original settings.
+    let [_splitbelow, _splitright] = [&amp;splitbelow, &amp;splitright]
+                                &quot; Set the setting to ours.
+    let [&amp;splitbelow, &amp;splitright] = [g:bufExplorerSplitBelow, g:bufExplorerSplitRight]
+                                &quot; Do it.
+    exe s:splitMode
+                                &quot; Restore the original settings.
+    let [&amp;splitbelow, &amp;splitright] = [_splitbelow, _splitright]
+  endif
 
   if !exists(&quot;b:displayMode&quot;) || b:displayMode != &quot;winmanager&quot;
-    &quot; Do not use keepalt when opening bufexplorer to allow the buffer that we
-    &quot; are leaving to become the new alternate buffer
+                                &quot; Do not use keepalt when opening bufexplorer to allow the buffer that we are
+                                &quot; leaving to become the new alternate buffer
     exec &quot;silent keepjumps &quot;.a:open.&quot; &quot;.name
   endif
 
@@ -257,7 +297,7 @@ endfunction
 &quot; MapKeys {{{1
 function s:MapKeys()
   if exists(&quot;b:displayMode&quot;) &amp;&amp; b:displayMode == &quot;winmanager&quot;
-    nnoremap &lt;buffer&gt; &lt;silent&gt; &lt;tab&gt; :call &lt;SID&gt;SelectBuffer()&lt;cr&gt;
+    nnoremap &lt;buffer&gt; &lt;silent&gt; &lt;tab&gt; :call &lt;SID&gt;SelectBuffer(&quot;tab&quot;)&lt;cr&gt;
   endif
 
   nnoremap &lt;buffer&gt; &lt;silent&gt; &lt;F1&gt;          :call &lt;SID&gt;ToggleHelp()&lt;cr&gt;
@@ -329,11 +369,9 @@ function s:ToggleHelp()
   let g:bufExplorerDetailedHelp = !g:bufExplorerDetailedHelp
 
   setlocal modifiable
-
-  &quot; Save position
+                                &quot; Save position.
   normal! ma
-
-  &quot; Remove old header
+                                &quot; Remove old header.
   if (s:firstBufferLine &gt; 1)
     exec &quot;keepjumps 1,&quot;.(s:firstBufferLine - 1) &quot;d _&quot;
   endif
@@ -446,11 +484,10 @@ endfunction
 &quot; BuildBufferList {{{1
 function s:BuildBufferList()
   let lines = []
-
-  &quot; Loop through every buffer.
+                                &quot; Loop through every buffer.
   for buf in s:raw_buffer_listing
     if (!g:bufExplorerShowUnlisted &amp;&amp; buf.attributes =~ &quot;u&quot;)
-      &quot; skip unlisted buffers if we are not to show them
+                                &quot; Skip unlisted buffers if we are not to show them.
       continue
     endif
 
@@ -485,11 +522,10 @@ endfunction
 
 &quot; SelectBuffer {{{1
 function s:SelectBuffer(...)
-  &quot; Sometimes messages are not cleared when we get here so it looks like an
-  &quot; error has occurred when it really has not.
+                                &quot; Sometimes messages are not cleared when we get here so it looks like an error has
+                                &quot; occurred when it really has not.
   echo &quot;&quot;
-
-  &quot; Are we on a line with a file name?
+                                &quot; Are we on a line with a file name?
   if line('.') &lt; s:firstBufferLine
     exec &quot;normal! \&lt;cr&gt;&quot;
     return
@@ -500,8 +536,12 @@ function s:SelectBuffer(...)
   if exists(&quot;b:displayMode&quot;) &amp;&amp; b:displayMode == &quot;winmanager&quot;
     let bufname = expand(&quot;#&quot;._bufNbr.&quot;:p&quot;)
 
-    call WinManagerFileEdit(bufname, 0)
-
+    if (a:0 == 1) &amp;&amp; (a:1 == &quot;tab&quot;)
+      call WinManagerFileEdit(bufname, 1)
+    else
+      call WinManagerFileEdit(bufname, 0)
+    endif
+ 
     return
   end
 
@@ -510,22 +550,40 @@ function s:SelectBuffer(...)
       return s:Close()
     endif
 
-    &quot; If the buf is active, then go to the tab where it is opened.
-    if bufloaded(_bufNbr) &amp;&amp; g:bufExplorerFindActive
-      call s:Close()
-      let bufname = expand(&quot;#&quot;._bufNbr.&quot;:p&quot;)
-&quot;      exec &quot;drop&quot; substitute(bufname, &quot;\\s&quot;, &quot;\\\\ &quot;, &quot;g&quot;)
-      exec bufname ? &quot;drop &quot;.substitute(bufname, &quot;\\s&quot;, &quot;\\\\ &quot;, &quot;g&quot;) : &quot;buffer &quot;._bufNbr
-    elseif (a:0)
-      call s:Close()
-      tabnew
-    endif
+    if (a:0 == 1) &amp;&amp; (a:1 == &quot;tab&quot;)
+                                &quot; Restore [BufExplorer] buffer.
+      exec &quot;keepjumps silent buffer!&quot;.s:originBuffer
 
-    &quot; Make the buffer 'listed' again.
-    call setbufvar(_bufNbr, &quot;&amp;buflisted&quot;, &quot;1&quot;)
+      let tabNbr = s:GetTabNbr(_bufNbr)
 
-    &quot; Switch to the buffer.
-    exec &quot;keepalt keepjumps silent b!&quot; _bufNbr
+      if tabNbr == 0
+                                &quot; _bufNbr is not opened in any tabs. Open a new tab with the selected buffer in it.
+        exec &quot;999tab split +buffer&quot; . _bufNbr
+      else
+                                &quot; The _bufNbr is already opened in tab(s), go to that tab.
+        exec tabNbr . &quot;tabnext&quot;
+                                &quot; Focus window.
+        exec s:GetWinNbr(tabNbr, _bufNbr) . &quot;wincmd w&quot;
+      endif
+    else
+      if bufloaded(_bufNbr) &amp;&amp; g:bufExplorerFindActive
+        call s:Close()
+
+        let tabNbr = s:GetTabNbr(_bufNbr)
+
+        if tabNbr != 0
+                                &quot; The buffer is located in a tab. Go to that tab number.
+          exec tabNbr . &quot;tabnext&quot;
+        else
+          let bufname = expand(&quot;#&quot;._bufNbr.&quot;:p&quot;)
+          exec bufname ? &quot;drop &quot;.escape(bufname, &quot; &quot;) : &quot;buffer &quot;._bufNbr
+        endif
+      endif
+                                &quot; Switch to the buffer.
+      exec &quot;keepalt keepjumps silent b!&quot; _bufNbr
+    endif
+                                &quot; Make the buffer 'listed' again.
+    call setbufvar(_bufNbr, &quot;&amp;buflisted&quot;, &quot;1&quot;)
   else
     call s:Error(&quot;Sorry, that buffer no longer exists, please select another&quot;)
     call s:DeleteBuffer(_bufNbr, &quot;wipe&quot;)
@@ -534,18 +592,16 @@ endfunction
 
 &quot; RemoveBuffer {{{1
 function s:RemoveBuffer(mode)
-  &quot; Are we on a line with a file name?
+                                &quot; Are we on a line with a file name?
   if line('.') &lt; s:firstBufferLine
     return
   endif
-
-  &quot; Do not allow this buffer to be deleted if it is the last one.
+                                &quot; Do not allow this buffer to be deleted if it is the last one.
   if len(s:MRUList) == 1
     call s:Error(&quot;Sorry, you are not allowed to delete the last buffer&quot;)
     return
   endif
-
-  &quot; These commands are to temporarily suspend the activity of winmanager.
+                                &quot; These commands are to temporarily suspend the activity of winmanager.
   if exists(&quot;b:displayMode&quot;) &amp;&amp; b:displayMode == &quot;winmanager&quot;
     call WinManagerSuspendAUs()
   end
@@ -556,11 +612,10 @@ function s:RemoveBuffer(mode)
     call s:Error(&quot;Sorry, no write since last change for buffer &quot;._bufNbr.&quot;, unable to delete&quot;)
     return
   else
-    &quot; Okay, everything is good, delete or wipe the buffer.
+                                &quot; Okay, everything is good, delete or wipe the buffer.
     call s:DeleteBuffer(_bufNbr, a:mode)
   endif
-
-  &quot; Reactivate winmanager autocommand activity.
+                                &quot; Reactivate winmanager autocommand activity.
   if exists(&quot;b:displayMode&quot;) &amp;&amp; b:displayMode == &quot;winmanager&quot;
     call WinManagerForceReSize(&quot;BufExplorer&quot;)
     call WinManagerResumeAUs()
@@ -569,7 +624,7 @@ endfunction
 
 &quot; DeleteBuffer {{{1
 function s:DeleteBuffer(buf, mode)
-  &quot; This routine assumes that the buffer to be removed is on the current line.
+                                &quot; This routine assumes that the buffer to be removed is on the current line.
   try
     if a:mode == &quot;wipe&quot;
       exe &quot;silent bw&quot; a:buf
@@ -580,8 +635,7 @@ function s:DeleteBuffer(buf, mode)
     setlocal modifiable
     normal! &quot;_dd
     setlocal nomodifiable
-
-    &quot; Delete the buffer from the raw buffer list.
+                                &quot; Delete the buffer from the raw buffer list.
     call filter(s:raw_buffer_listing, 'v:val.attributes !~ &quot; '.a:buf.' &quot;')
   catch
     call s:Error(v:exception)
@@ -590,8 +644,12 @@ endfunction
 
 &quot; Close {{{1
 function s:Close()
-  &quot; Get only the listed buffers.
+                                &quot; Get only the listed buffers.
   let listed = filter(copy(s:MRUList), &quot;buflisted(v:val)&quot;)
+                                &quot; If we needed to split the main window, close the split one.
+  if (s:splitMode != &quot;&quot;)
+    exec &quot;wincmd c&quot;
+  end
 
   for b in reverse(listed[0:1])
     exec &quot;keepjumps silent b &quot;.b
@@ -669,7 +727,7 @@ endfunction
 
 &quot; SortSelect {{{1
 function s:SortSelect()
-  let g:bufExplorerSortBy = get(s:sort_by, index(s:sort_by, g:bufExplorerSortBy)+1, s:sort_by[0])
+  let g:bufExplorerSortBy = get(s:sort_by, index(s:sort_by, g:bufExplorerSortBy) + 1, s:sort_by[0])
 
   call s:ReSortListing()
 endfunction
@@ -693,7 +751,7 @@ function s:SortListing()
   let sort = s:firstBufferLine.&quot;,$sort&quot;.((g:bufExplorerReverseSort == 1) ? &quot;!&quot;: &quot;&quot;)
 
   if g:bufExplorerSortBy == &quot;number&quot;
-    &quot; Easiest case.
+                                &quot; Easiest case.
     exec sort 'n'
   elseif g:bufExplorerSortBy == &quot;name&quot;
     if g:bufExplorerSplitOutPathName
@@ -703,7 +761,7 @@ function s:SortListing()
     endif
   elseif g:bufExplorerSortBy == &quot;fullpath&quot;
     if g:bufExplorerSplitOutPathName
-      &quot; Sort twice - first on the file name then on the path.
+                                &quot; Sort twice - first on the file name then on the path.
       exec sort 'ir /\d.\{7}\zs\f\+\ze/'
     endif
 
@@ -733,11 +791,29 @@ function s:Error(msg)
   echohl ErrorMsg | echo a:msg | echohl none
 endfunction
 
-&quot; Warn {{{1
-function s:Warn(msg)
+&quot; Warning {{{1
+function s:Warning(msg)
   echohl WarningMsg | echo a:msg | echohl none
 endfunction
 
+&quot; GetTabNbr {{{1
+function s:GetTabNbr(bufNbr)
+  &quot; Searching buffer bufno, in tabs.
+  for i in range(tabpagenr(&quot;$&quot;))
+    if index(tabpagebuflist(i + 1), a:bufNbr) != -1
+      return i + 1
+    endif
+  endfor
+
+  return 0
+endfunction
+
+&quot; GetWinNbr&quot; {{{1
+function s:GetWinNbr(tabNbr, bufNbr)
+  &quot; window number in tabpage.
+  return index(tabpagebuflist(a:tabNbr), a:bufNbr) + 1
+endfunction
+
 &quot; Winmanager Integration {{{1
 let g:BufExplorer_title = &quot;\[Buf\ List\]&quot;
 call s:Set(&quot;g:bufExplorerResize&quot;, 1)</diff>
      <filename>plugin/bufexplorer.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4a6ef90b11fcb44d262c968cb95713c231bd36ef</id>
    </parent>
  </parents>
  <author>
    <name>Martin Grenfell</name>
    <email>marty@zodal.net</email>
  </author>
  <url>http://github.com/scrooloose/vimfiles/commit/6fb4ef77db60f1ca935c581f2363acd8d0b3013d</url>
  <id>6fb4ef77db60f1ca935c581f2363acd8d0b3013d</id>
  <committed-date>2009-06-09T22:27:48-07:00</committed-date>
  <authored-date>2009-06-09T22:27:48-07:00</authored-date>
  <message>add latest bufexplorer</message>
  <tree>d6c6e79e57d2dc27299807f12523fc60203d11f9</tree>
  <committer>
    <name>Martin Grenfell</name>
    <email>marty@zodal.net</email>
  </committer>
</commit>
