Permalink
Browse files

ExpandDir bug fixed

  • Loading branch information...
1 parent f77a6c8 commit af8fec38639f0f170bdf195959bb6f723ff8f60c @troydm committed Oct 8, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 plugin/easytree.vim
View
@@ -730,18 +730,15 @@ function! s:ExpandDir(fpath,linen)
let lvl = s:GetLvl(getline(linen))
let lvls = repeat(' ',lvl)
exe "let treelist = pyeval(\"EasyTreeListDir(vim.eval('a:fpath'),".b:showhidden.")\")"
+ let cascade = g:easytree_cascade_open_single_dir && len(treelist[1]) == 1 && len(treelist[2]) == 0
for d in treelist[1]
call append(linen,lvls.''.d)
let linen += 1
let fpath = s:GetFullPath(linen)
- if has_key(b:expanded,fpath) && b:expanded[fpath]
+ if (has_key(b:expanded,fpath) && b:expanded[fpath]) || cascade
let linen = s:ExpandDir(fpath,linen)
endif
endfor
- if g:easytree_cascade_open_single_dir && len(treelist[1]) == 1 && len(treelist[2]) == 0
- let fpath = s:GetFullPath(linen)
- let linen = s:ExpandDir(fpath,linen)
- endif
for f in treelist[2]
call append(linen,lvls.' '.f)
let linen += 1

0 comments on commit af8fec3

Please sign in to comment.