From c8fbd773b4081a9ab30c019b2f95d76be1ccf56f Mon Sep 17 00:00:00 2001 From: Kien N Date: Sat, 14 Apr 2012 03:18:18 +0700 Subject: [PATCH] Give last-modified-time higher priority in MRU mode Refs #177 --- autoload/ctrlp.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 0a4c461..7fa8b12 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -1007,7 +1007,11 @@ fu! s:mixedsort(s1, s2) let [mp_2, mp_3, mp_4, mp_1] = s:multipliers(cfn, par, cml, ctm) el let ctm = s:comptime(a:s1, a:s2) - let [mp_1, mp_2, mp_3, mp_4] = s:multipliers(ctm, cfn, par, cml) + if s:itemtype == 2 + let [mp_2, mp_3, mp_4, mp_1] = s:multipliers(cfn, par, cml, ctm) + el + let [mp_1, mp_2, mp_3, mp_4] = s:multipliers(ctm, cfn, par, cml) + en en retu cln + ctm * mp_1 + cfn * mp_2 + par * mp_3 + cml * mp_4 en