Skip to content

Commit

Permalink
Make indentation of file nodes more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Feb 20, 2011
1 parent eac3214 commit 867de91
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugin/NERD_tree.vim
Expand Up @@ -1326,7 +1326,7 @@ function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild)
let treeParts = treeParts . ''
endif
else
let treeParts = treeParts . ''
let treeParts = treeParts . ' '
endif
let line = treeParts . self.displayString()

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 867de91

Please sign in to comment.