Skip to content

Commit 12a5367

Browse files
author
Pascal Lalancette
committed
Fix most recent used buffer list sorting when using CtrlpBuffers
1 parent 2f650e6 commit 12a5367

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

autoload/ctrlp.vim

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,16 @@ endf
13241324
fu! s:compmreb(...)
13251325
" By last entered time (bufnr)
13261326
let [id1, id2] = [index(s:mrbs, a:1), index(s:mrbs, a:2)]
1327-
retu id1 == id2 ? 0 : id1 > id2 ? 1 : -1
1327+
if id1 == id2
1328+
return 0
1329+
endif
1330+
if id1 < 0
1331+
return 1
1332+
endif
1333+
if id2 < 0
1334+
return -1
1335+
endif
1336+
return id1 > id2 ? 1 : -1
13281337
endf
13291338

13301339
fu! s:compmref(...)

0 commit comments

Comments
 (0)