瀏覽代碼

Merge pull request #60 from justfalter/fix-last-tab-syntax

Backward-compatible fix for invalid tab range bug
jlanzarotta 8 年之前
父節點
當前提交
e57b6ded06
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      plugin/bufexplorer.vim

+ 6 - 1
plugin/bufexplorer.vim

@@ -826,7 +826,12 @@ function! s:SelectBuffer(...)
             " Was the tab found?
             if tabNbr == 0
                 " _bufNbr is not opened in any tabs. Open a new tab with the selected buffer in it.
-                execute "999tab split +buffer" . _bufNbr
+                if v:version > 704 || ( v:version == 704 && has('patch2237') )
+                  " new syntax for last tab as of 7.4.2237
+                  execute "$tab split +buffer" . _bufNbr
+                else
+                  execute "999tab split +buffer" . _bufNbr
+                endif
                 " Workaround for the issue mentioned in UpdateTabBufData
                 call s:UpdateTabBufData(_bufNbr)
             else