We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2ca72c commit 6e2dd63Copy full SHA for 6e2dd63
1 file changed
autoload/ctrlp.vim
@@ -1994,9 +1994,13 @@ fu! s:bufnrfilpath(line)
1994
en
1995
let filpath = fnamemodify(filpath, ':p')
1996
let bufnr = bufnr('^'.filpath.'$')
1997
- if (a:line =~ '[\/]\?\[\d\+\*No Name\]$' && !filereadable(filpath) && bufnr < 1)
1998
- let bufnr = str2nr(matchstr(a:line, '[\/]\?\[\zs\d\+\ze\*No Name\]$'))
1999
- let filpath = bufnr
+ if (!filereadable(filpath) && bufnr < 1)
+ if (a:line =~ '[\/]\?\[\d\+\*No Name\]$')
+ let bufnr = str2nr(matchstr(a:line, '[\/]\?\[\zs\d\+\ze\*No Name\]$'))
2000
+ let filpath = bufnr
2001
+ else
2002
+ let bufnr = bufnr(a:line)
2003
+ en
2004
2005
retu [bufnr, filpath]
2006
endf
0 commit comments