aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTakahiro Yoshihara2017-02-21 09:07:51 +0900
committerTakahiro Yoshihara2017-02-21 09:14:38 +0900
commit5c8cbb683b4b2e3c4dd495f08d1d6757dd40995b (patch)
treea75d4eea2207e408db6343a4869274b701b42135
parent7fa89fec125ce60a341f7c37dd769a8a31c49359 (diff)
downloadctrlp.vim-fix-buf-matching-by-fname.tar.gz

Fix incorrect matching in buffer mode with by_filename

fix-buf-matching-by-fname
-rw-r--r--autoload/ctrlp.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index 6558939..05196ae 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -2384,7 +2384,7 @@ endf
fu! s:matchbuf(item, pat)
let bufnr = s:bufnrfilpath(a:item)[0]
let parts = s:bufparts(bufnr)
- let item = bufnr.parts[0].parts[2].s:lash().parts[3]
+ let item = s:byfname ? parts[2] : bufnr.parts[0].parts[2].s:lash().parts[3]
retu match(item, a:pat)
endf