mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 03:43:50 -05:00
fix flag rendering for cascading dirs
Use the innermost dirs flags only. Previously each dirs flags were
rendered inline i.e.
[x]dir1/[y]dir2/[z]dir3/
This looked bad and broke the UI. Now we only render the flags for dir3
- and render them on the left side of the cascade.
Not sure if this is ultimately the right decision - but will do for now.
This commit is contained in:
@@ -40,9 +40,7 @@ endfunction
|
||||
|
||||
"FUNCTION: Path.cacheDisplayString() {{{1
|
||||
function! s:Path.cacheDisplayString() abort
|
||||
let self.cachedDisplayString = self.flagSet.renderToString()
|
||||
|
||||
let self.cachedDisplayString .= self.getLastPathComponent(1)
|
||||
let self.cachedDisplayString = self.getLastPathComponent(1)
|
||||
|
||||
if self.isExecutable
|
||||
let self.cachedDisplayString = self.cachedDisplayString . '*'
|
||||
|
||||
@@ -84,7 +84,9 @@ function! s:TreeDirNode.displayString()
|
||||
|
||||
let sym = cascade[-1].isOpen ? g:NERDTreeDirArrowCollapsible : g:NERDTreeDirArrowExpandable
|
||||
|
||||
return sym . ' ' . rv
|
||||
let flags = cascade[-1].path.flagSet.renderToString()
|
||||
|
||||
return sym . ' ' . flags . rv
|
||||
endfunction
|
||||
|
||||
"FUNCTION: TreeDirNode.findNode(path) {{{1
|
||||
|
||||
@@ -83,7 +83,7 @@ endfunction
|
||||
"Return:
|
||||
"a string that can be used in the view to represent this node
|
||||
function! s:TreeFileNode.displayString()
|
||||
return self.path.displayString()
|
||||
return self.path.flagSet.renderToString() . self.path.displayString()
|
||||
endfunction
|
||||
|
||||
"FUNCTION: TreeFileNode.equals(treenode) {{{1
|
||||
|
||||
Reference in New Issue
Block a user