" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
elseif curline =~ '@$'
" call Decho("handle symbolic link from current line",'~'.expand("<slnum>"))
- let treedir= resolve(substitute(substitute(getline('.'),'@.*$','','e'),'^|*\s*','','e'))
+ let potentialdir= resolve(substitute(substitute(getline('.'),'@.*$','','e'),'^|*\s*','','e'))
" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
else
" call Decho("do not extract tree subdirectory from current line and set treedir to empty",'~'.expand("<slnum>"))
" call Decho("COMBAK#23 : mod=".&mod." win#".winnr())
" call Decho("islocal=".a:islocal." curline<".curline.">",'~'.expand("<slnum>"))
- let potentialdir= s:NetrwFile(substitute(curline,'^'.s:treedepthstring.'\+ \(.*\)@$','\1',''))
" call Decho("potentialdir<".potentialdir."> isdir=".isdirectory(potentialdir),'~'.expand("<slnum>"))
" call Decho("COMBAK#24 : mod=".&mod." win#".winnr())
" " call Decho("newdir <".newdir.">",'~'.expand("<slnum>"))
" else
" call Decho("apply NetrwTreePath to treetop<".w:netrw_treetop.">",'~'.expand("<slnum>"))
- let treedir = s:NetrwTreePath(w:netrw_treetop)
-" endif
+ if a:islocal && curline =~ '@$'
+ if isdirectory(s:NetrwFile(potentialdir))
+ let treedir = w:netrw_treetop.'/'.potentialdir.'/'
+ let w:netrw_treetop = treedir
+ endif
+ else
+ let potentialdir= s:NetrwFile(substitute(curline,'^'.s:treedepthstring.'\+ \(.*\)@$','\1',''))
+ let treedir = s:NetrwTreePath(w:netrw_treetop)
+ endif
endif
" call Decho("COMBAK#25 : mod=".&mod." win#".winnr())