Make indentation of file nodes more intuitive

This commit is contained in:
Marcin Kulik 2011-02-20 20:42:03 +01:00
parent eac32148a4
commit 867de91643

View File

@ -3112,7 +3112,13 @@ function! s:getTreeWinNum()
endfunction
"FUNCTION: s:indentLevelFor(line) {{{2
function! s:indentLevelFor(line)
return match(a:line, '[^ \-+~`|]') / s:tree_wid
let level = match(a:line, '[^ \-+~▸▾`|]') / s:tree_wid
" check if line includes arrows
if match(a:line, '[▸▾]') > -1
" decrement level as arrow uses 3 ascii chars
let level = level - 1
endif
return level
endfunction
"FUNCTION: s:isTreeOpen() {{{2
function! s:isTreeOpen()