Skip to content

Commit 7dfcc81

Browse files
committed
Shell escape file path before blaming
1 parent 20151ea commit 7dfcc81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/blamer.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ function! s:GetLines() abort
9292
endfunction
9393

9494
function! blamer#GetMessage(file, line_number, line_count) abort
95-
let l:command = 'git --no-pager blame -p -L ' . a:line_number . ',' . a:line_count . ' -- ' . a:file
95+
let l:file_path_escaped = shellescape(a:file)
96+
let l:command = 'git --no-pager blame -p -L ' . a:line_number . ',' . a:line_count . ' -- ' . l:file_path_escaped
9697
let l:result = system(l:command)
9798

9899
let l:lines = split(l:result, '\n')

0 commit comments

Comments
 (0)