Support edit script when temp dir name contains space

Looks like GIT_EDITOR supports quotes now.

Resolves: https://github.com/tpope/vim-fugitive/issues/2255
This commit is contained in:
Tim Pope
2024-01-19 18:00:43 -05:00
parent ec8f7eed10
commit 854a8df0d0

View File

@@ -273,6 +273,9 @@ function! s:TempScript(...) abort
if !filereadable(temp)
call writefile(['#!/bin/sh'] + a:000, temp)
endif
if temp =~# '\s'
let temp = '"' . temp . '"'
endif
return FugitiveGitPath(temp)
endfunction