From 02facac20aa0446859f708fdc6a0c5a5c74778de Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Mon, 30 Jun 2008 09:26:18 +1200 Subject: [PATCH] make bookmark width take into account the line numbers --- plugin/NERD_tree.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 57c6394..86d182c 100644 --- 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)