nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 02facac20aa0446859f708fdc6a0c5a5c74778de
parent 7789ccb90a47e9a5c159cc38f73b8028eea086ee
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Mon, 30 Jun 2008 09:26:18 +1200

make bookmark width take into account the line numbers

Diffstat:
Mplugin/NERD_tree.vim | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -284,6 +284,10 @@ endfunction
 " Get the string that should be rendered in the view for this bookmark
 function! s:oBookmark.Str() dict
     let pathStrMaxLen = winwidth(s:GetTreeWinNum()) - 5 - len(self.name)
+    if &nu
+        let pathStrMaxLen = pathStrMaxLen - &numberwidth
+    endif
+
     let pathStr = self.path.StrForOS(0)
     if len(pathStr) > pathStrMaxLen
         let pathStr = '<' . strpart(pathStr, len(pathStr) - pathStrMaxLen)