dblume commited on 2023-06-17 23:02:42
Showing 1 changed files, with 5 additions and 5 deletions.
| ... | ... |
@@ -166,14 +166,14 @@ function! GitBlame() |
| 166 | 166 |
let l:bufname = 'git blame ' . l:hash . '^ -- ' . l:fname |
| 167 | 167 |
if !ShowBufInNewTab(l:bufname) |
| 168 | 168 |
exec 'tabnew | r! git blame ' . l:hash . '^ -- ' . shellescape(l:fname) |
| 169 |
- exec 'silent :file ' . l:bufname |
|
| 169 |
+ exec 'silent :file ' . fnameescape(l:bufname) |
|
| 170 | 170 |
endif |
| 171 | 171 |
else |
| 172 | 172 |
let l:fname = expand('%')
|
| 173 | 173 |
let l:bufname = 'git blame -- ' . l:fname |
| 174 | 174 |
if !ShowBufInNewTab(l:bufname) |
| 175 | 175 |
exec 'tabnew | r! git blame -- ' . shellescape(l:fname) |
| 176 |
- exec 'silent :file ' . l:bufname |
|
| 176 |
+ exec 'silent :file ' . fnameescape(l:bufname) |
|
| 177 | 177 |
endif |
| 178 | 178 |
endif |
| 179 | 179 |
0d_ |
| ... | ... |
@@ -196,13 +196,13 @@ function! GitShow(commit_or_file) |
| 196 | 196 |
" exec 'tabnew | r! git show ' . l:hash . ' -- ' . shellescape(l:fname) |
| 197 | 197 |
exec 'tabnew | r! git show ' . l:hash |
| 198 | 198 |
" We lie here (' -- ') to have a filename the other git commands can use.
|
| 199 |
- exec 'silent :file ' . l:bufname |
|
| 199 |
+ exec 'silent :file ' . fnameescape(l:bufname) |
|
| 200 | 200 |
endif |
| 201 | 201 |
else |
| 202 | 202 |
let l:bufname = 'git show ' . l:hash . ':' . l:fname |
| 203 | 203 |
if !ShowBufInNewTab(l:bufname) |
| 204 | 204 |
exec 'tabnew | r! git show ' . l:hash . ':' . shellescape(l:fname) |
| 205 |
- exec 'silent :file ' . l:bufname |
|
| 205 |
+ exec 'silent :file ' . fnameescape(l:bufname) |
|
| 206 | 206 |
endif |
| 207 | 207 |
endif |
| 208 | 208 |
setl buftype=nofile |
| ... | ... |
@@ -263,7 +263,7 @@ function! GitLog() |
| 263 | 263 |
exec 'tabnew | r! git log1 -- ' . shellescape(l:fname) |
| 264 | 264 |
setl buftype=nofile |
| 265 | 265 |
0d_ |
| 266 |
- exec 'silent :file ' . l:bufname |
|
| 266 |
+ exec 'silent :file ' . fnameescape(l:bufname) |
|
| 267 | 267 |
endif |
| 268 | 268 |
endfunction |
| 269 | 269 |
command Log :call GitLog() |
| 270 | 270 |