Show diffs correctly in p4 and svn Vim scripts when files to diff contain spaces.
set nomod
" Get the files in the changelist.
- let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\\1@p' " . bufname(""))
+ let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\"\\1\"@p' " . bufname(""))
" Create a new window, move it below the spec and read in a diff.
botright new
if l:files != ""
set nomod
" Get the modified files. Discount new files.
- let l:files = system("sed -n '1,/^$/d;s/^[MR]....//p' " . bufname(""))
+ let l:files = system("sed -n '1,/^$/d;/^[MR]..../{s//\"/;s/$/\"/p;}' " . bufname(""))
if l:files == ""
return