Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

expanding redraw interval added

  • Loading branch information...
commit e7b9d5927036060f2a680b16432414217133c44f 1 parent 09be36d
@troydm authored
Showing with 13 additions and 3 deletions.
  1. +13 −3 autoload/easytree.vim
View
16 autoload/easytree.vim
@@ -730,8 +730,18 @@ function! s:UnexpandDir(fpath,linen)
endfunction
function! s:ExpandDir(fpath,linen)
- redraw
- echo 'expanding '.a:fpath
+ if !exists('b:expandtime')
+ let b:expandtime = str2float(reltimestr(reltime()))
+ else
+ let tdiff = (str2float(reltimestr(reltime())) - b:expandtime)
+ if tdiff >= 1.0
+ if tdiff <= 1.5
+ redraw
+ echo 'expanding '.a:fpath
+ endif
+ let b:expandtime = str2float(reltimestr(reltime()))
+ endif
+ endif
let linen = a:linen
if g:easytree_use_plus_and_minus
call setline(linen,substitute(getline(linen),'+','-',''))
@@ -1000,7 +1010,7 @@ function! easytree#OpenTree(win, dir)
return
endif
call s:OpenEasyTreeWindow(a:win)
- setlocal filetype=easytree buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap nonumber
+ setlocal filetype=easytree buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap nonumber winfixwidth
if g:easytree_show_line_numbers
setlocal number
endif
Please sign in to comment.
Something went wrong with that request. Please try again.