Improve the style in a "TreeFileNode" method
No functional changes here.
This commit is contained in:
parent
d745e11b42
commit
c6a68d4b96
@ -196,14 +196,18 @@ function! s:TreeFileNode.GetRootForTab()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: TreeFileNode.GetSelected() {{{1
|
" FUNCTION: TreeFileNode.GetSelected() {{{1
|
||||||
" gets the treenode that the cursor is currently over
|
" If the cursor is currently positioned on a tree node, return the node.
|
||||||
|
" Otherwise, return the empty dictionary.
|
||||||
function! s:TreeFileNode.GetSelected()
|
function! s:TreeFileNode.GetSelected()
|
||||||
|
|
||||||
try
|
try
|
||||||
let path = b:NERDTree.ui.getPath(line("."))
|
let l:path = b:NERDTree.ui.getPath(line('.'))
|
||||||
if path ==# {}
|
|
||||||
|
if empty(l:path)
|
||||||
return {}
|
return {}
|
||||||
endif
|
endif
|
||||||
return b:NERDTree.root.findNode(path)
|
|
||||||
|
return b:NERDTree.root.findNode(l:path)
|
||||||
catch /^NERDTree/
|
catch /^NERDTree/
|
||||||
return {}
|
return {}
|
||||||
endtry
|
endtry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user