Skip to content

Commit ede737b

Browse files
committed
Fix #230
1 parent 35fac96 commit ede737b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

autoload/ctrlp.vim

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,10 +1934,15 @@ endf
19341934

19351935
fu! s:bufnrfilpath(line)
19361936
if s:isabs(a:line)
1937-
let filpath = fnamemodify(a:line, ':p')
1937+
let filpath = a:line
19381938
el
1939-
let filpath = fnamemodify(s:dyncwd.(&shellslash ? '/' : '\').a:line, ':p')
1939+
if (has('win32') || has('win64')) && !&shellslash
1940+
let filpath = s:dyncwd.'\'.a:line
1941+
el
1942+
let filpath = s:dyncwd.'/'.a:line
1943+
en
19401944
en
1945+
let filpath = fnamemodify(filpath, ':p')
19411946
let bufnr = bufnr('^'.filpath.'$')
19421947
if (a:line =~ '[\/]\?\[\d\+\*No Name\]$' && !filereadable(filpath) && bufnr < 1)
19431948
let bufnr = str2nr(matchstr(a:line, '[\/]\?\[\zs\d\+\ze\*No Name\]$'))

0 commit comments

Comments
 (0)