mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-23 13:12:41 +08:00
Make indentation of file nodes more intuitive
This commit is contained in:
parent
eac32148a4
commit
867de91643
|
@ -1326,7 +1326,7 @@ function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild)
|
||||||
let treeParts = treeParts . '▸ '
|
let treeParts = treeParts . '▸ '
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let treeParts = treeParts . ''
|
let treeParts = treeParts . ' '
|
||||||
endif
|
endif
|
||||||
let line = treeParts . self.displayString()
|
let line = treeParts . self.displayString()
|
||||||
|
|
||||||
|
@ -3112,7 +3112,13 @@ function! s:getTreeWinNum()
|
||||||
endfunction
|
endfunction
|
||||||
"FUNCTION: s:indentLevelFor(line) {{{2
|
"FUNCTION: s:indentLevelFor(line) {{{2
|
||||||
function! s:indentLevelFor(line)
|
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
|
endfunction
|
||||||
"FUNCTION: s:isTreeOpen() {{{2
|
"FUNCTION: s:isTreeOpen() {{{2
|
||||||
function! s:isTreeOpen()
|
function! s:isTreeOpen()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user