diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 93354f4..1dc8b7d 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -6,6 +6,42 @@ " ============================================================================= " * Static variables {{{1 +fu! s:ignore() "{{{2 + let igdirs = [ + \ '\.git$', + \ '\.hg$', + \ '\.svn$', + \ '_darcs$', + \ '\.bzr$', + \ '\.cdv$', + \ '\~\.dep$', + \ '\~\.dot$', + \ '\~\.nib$', + \ '\~\.plst$', + \ '\.pc$', + \ '_MTN$', + \ ' 2 @@ -639,7 +674,7 @@ endf fu! s:PrtExit() if !has('autocmd') | cal s:Close() | en - exe s:currwin.'winc w' + winc p endf fu! s:PrtHistory(...) @@ -1017,10 +1052,10 @@ fu! s:mixedsort(...) let ms = [] if s:height < 21 let ms += [s:compfnlen(a:1, a:2)] - if s:itemtype !~ '\v^(1|2)$' | let ms += [s:comptime(a:1, a:2)] | en + if s:itemtype !~ '^[12]$' | let ms += [s:comptime(a:1, a:2)] | en if !s:itemtype | let ms += [s:comparent(a:1, a:2)] | en en - if s:itemtype =~ '\v^(1|2)$' + if s:itemtype =~ '^[12]$' let ms += [s:compmref(a:1, a:2)] | let cln = 0 en let ms += [cml, 0, 0, 0] @@ -1084,8 +1119,9 @@ endf fu! ctrlp#progress(enum) if has('macunix') || has('mac') | sl 1m | en + let txt = ' (press ctrl-c to abort)' let &l:stl = s:status != {} ? call(s:status['prog'], [a:enum]) - \ : '%#CtrlPStats# '.a:enum.' %* %=%<%#CtrlPMode2# '.s:dyncwd.' %*' + \ : '%#CtrlPStats# '.a:enum.' %*'.txt.'%=%<%#CtrlPMode2# '.s:dyncwd.' %*' redraws endf " Paths {{{2 @@ -1501,7 +1537,6 @@ fu! s:getenv() let [s:crword, s:crline] = [expand('', 1), getline('.')] let [s:winh, s:crcursor] = [min([s:mxheight, &lines]), getpos('.')] let [s:crbufnr, s:crvisual] = [bufnr('%'), s:lastvisual()] - let s:currwin = s:mwbottom ? winnr() : winnr() + has('autocmd') let s:wpmode = exists('b:ctrlp_working_path_mode') \ ? b:ctrlp_working_path_mode : s:pathmode let [s:mrbs, s:crgfile] = [ctrlp#mrufiles#bufs(), expand('', 1)]