Skip to content

Commit 9217fef

Browse files
committed
Merge pull request #29 from gadomski/fnameescape-detect-style-file
Use fnameescape when detecting style files
2 parents d90af92 + 8cd2919 commit 9217fef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/clang_format.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ let g:clang_format#auto_formatexpr = s:getg('clang_format#auto_formatexpr', 0)
146146

147147
" format codes {{{
148148
function! s:detect_style_file()
149-
let dirname = expand('%:p:h')
149+
let dirname = fnameescape(expand('%:p:h'))
150150
let style_file_name = has('win32') || has('win64') ? '_clang-format' : '.clang-format'
151151
return findfile(style_file_name, dirname.';') != ''
152152
endfunction

0 commit comments

Comments
 (0)