make bookmark width take into account the line numbers

This commit is contained in:
Martin Grenfell 2008-06-30 09:26:18 +12:00
parent 7789ccb90a
commit 02facac20a

View File

@ -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)