Permalink
Browse files

Fix sorting by match length

* Broken by previous commit.
  • Loading branch information...
kien committed Nov 8, 2011
1 parent 2f4d281 commit b6764d7c0a821de174a8cad2f86669654a1be886
Showing with 1 addition and 1 deletion.
  1. +1 −1 autoload/ctrlp.vim
View
@@ -785,7 +785,7 @@ fu! s:comptime(s1, s2)
endf
fu! s:matchlens(str, pat, ...)
- if empty(a:pat) || a:pat =~ '^\|$' | retu {} | en
+ if empty(a:pat) || index(['^','$'], a:pat) >= 0 | retu {} | en
let st = exists('a:1') ? a:1 : 0
let lens = exists('a:2') ? a:2 : {}
let nr = exists('a:3') ? a:3 : 0

0 comments on commit b6764d7

Please sign in to comment.