Browse Source

Fixed WinManager integration

Thanks to devakivamsi for pointing out that even though bufexplorer
turns off line numbers by default within its own window, this did not
work correctly when using WinManager.  This has now been corrected.
jeff 8 years ago
parent
commit
fe1e243221
2 changed files with 39 additions and 30 deletions
  1. 9 5
      doc/bufexplorer.txt
  2. 30 25
      plugin/bufexplorer.vim

+ 9 - 5
doc/bufexplorer.txt

@@ -1,7 +1,7 @@
-*bufexplorer.txt*              Buffer Explorer       Last Change: 30 Sep 2016
+*bufexplorer.txt*              Buffer Explorer       Last Change: 08 Mar 2017
 
 Buffer Explorer                                *buffer-explorer* *bufexplorer*
-                                Version 7.4.12
+                                Version 7.4.13
 
 Plugin for easily exploring (or browsing) Vim|:buffers|.
 
@@ -253,7 +253,11 @@ The default is 0, so that the size is set by Vim.
 ===============================================================================
 CHANGE LOG                                              *bufexplorer-changelog*
 
-7.4.12   September, 30, 2016
+7.4.13   March 08, 2017
+    - Thanks to devakivamsi for pointing out that even though bufexplorer
+      turns off line numbers by default within its own window, this did not
+      work correctly when using WinManager.  This has now been corrected.
+7.4.12   September 30, 2016
     - Thanks again to Martin Vuille for several more fixes related to making
       bufexplorer more tab-friendly.
 7.4.11   September, 20, 2016
@@ -720,7 +724,7 @@ TODO                                                         *bufexplorer-todo*
 ===============================================================================
 CREDITS                                                   *bufexplorer-credits*
 
-Author: Jeff Lanzarotta <delux256-vim at yahoo dot com>
+Author: Jeff Lanzarotta <delux256-vim at outlook dot com>
 
 Credit must go out to Bram Moolenaar and all the Vim developers for
 making the world's best editor (IMHO). I also want to thank everyone who
@@ -730,7 +734,7 @@ won't list names.
 ===============================================================================
 COPYRIGHT                                               *bufexplorer-copyright*
 
-Copyright (c) 2001-2016, Jeff Lanzarotta
+Copyright (c) 2001-2017, Jeff Lanzarotta
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without

+ 30 - 25
plugin/bufexplorer.vim

@@ -1,5 +1,5 @@
-"=============================================================================
-"    Copyright: Copyright (c) 2001-2016, Jeff Lanzarotta
+"============================================================================
+"    Copyright: Copyright (c) 2001-2017, Jeff Lanzarotta
 "               All rights reserved.
 "
 "               Redistribution and use in source and binary forms, with or
@@ -36,7 +36,7 @@
 " Name Of File: bufexplorer.vim
 "  Description: Buffer Explorer Vim Plugin
 "   Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com)
-" Last Changed: Friday, 30 September 2016
+" Last Changed: Wednesday, 08 March 2017
 "      Version: See g:bufexplorer_version for version number.
 "        Usage: This file should reside in the plugin directory and be
 "               automatically sourced.
@@ -74,7 +74,7 @@ endif
 "1}}}
 
 " Version number
-let g:bufexplorer_version = "7.4.12"
+let g:bufexplorer_version = "7.4.13"
 
 " Plugin Code {{{1
 " Check for Vim version {{{2
@@ -117,7 +117,7 @@ function! s:Set(var, default)
 endfunction
 
 " Script variables {{{2
-let s:MRU_Exclude_List = ["[BufExplorer]","__MRU_Files__"]
+let s:MRU_Exclude_List = ["[BufExplorer]","__MRU_Files__","[Buf\ List]"]
 let s:MRUList = []
 let s:name = '[BufExplorer]'
 let s:originBuffer = 0
@@ -329,26 +329,7 @@ endfunction
 
 " Initialize {{{2
 function! s:Initialize()
-    let s:_insertmode = &insertmode
-    set noinsertmode
-
-    let s:_showcmd = &showcmd
-    set noshowcmd
-
-    let s:_cpo = &cpo
-    set cpo&vim
-
-    let s:_report = &report
-    let &report = 10000
-
-    setlocal nonumber
-    setlocal foldcolumn=0
-    setlocal nofoldenable
-    setlocal cursorline
-    setlocal nospell
-
-    setlocal nobuflisted
-
+    call s:SetLocalSettings()
     let s:running = 1
 endfunction
 
@@ -376,6 +357,28 @@ function! s:Cleanup()
     delmarks!
 endfunction
 
+" SetLocalSettings {{{2
+function! s:SetLocalSettings()
+    let s:_insertmode = &insertmode
+    set noinsertmode
+
+    let s:_showcmd = &showcmd
+    set noshowcmd
+
+    let s:_cpo = &cpo
+    set cpo&vim
+
+    let s:_report = &report
+    let &report = 10000
+
+    setlocal nonumber
+    setlocal foldcolumn=0
+    setlocal nofoldenable
+    setlocal cursorline
+    setlocal nospell
+    setlocal nobuflisted
+endfunction
+
 " BufExplorerHorizontalSplit {{{2
 function! BufExplorerHorizontalSplit()
     let s:splitMode = "sp"
@@ -1210,6 +1213,7 @@ call s:Set("g:bufExplorerMaxHeight", 25) " Handles dynamic resizing of the windo
 " or by winmanager.
 function! BufExplorer_Start()
     let b:displayMode = "winmanager"
+    call s:SetLocalSettings()
     call BufExplorer()
 endfunction
 
@@ -1221,6 +1225,7 @@ endfunction
 " Handles dynamic refreshing of the window.
 function! BufExplorer_Refresh()
     let b:displayMode = "winmanager"
+    call s:SetLocalSettings()
     call BufExplorer()
 endfunction