Fix s:sort_by_mtime()

Fixes #260.
This commit is contained in:
Marco Hinz 2017-01-07 02:11:16 +01:00
parent 28cfff5ba9
commit af521fa617
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F

View file

@ -586,7 +586,9 @@ function! s:show_sessions() abort
if get(g:, 'startify_session_sort')
function! s:sort_by_mtime(foo, bar)
return getftime(a:foo) <= getftime(a:bar)
let foo = getftime(a:foo)
let bar = getftime(a:bar)
return foo == bar ? 0 : (foo < bar ? 1 : -1)
endfunction
call sort(sfiles, 's:sort_by_mtime')
endif