Fix diffs of files with spaces.
[profile.git] / .vim / script / svn
index 92cc8a5..d5244fb 100644 (file)
@@ -5,7 +5,7 @@ fun! SVNcommit()
   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
@@ -23,12 +23,7 @@ fun! SVNcommit()
   set buftype=nowrite
   set bufhidden=hide
   setlocal noswapfile
-
-  " Change directory so "file [svn diff]" doesn't try to cd somewhere.
-  let l:cwd=getcwd()
-  cd /
-  file [svn diff]
-  cd l:cwd
+  file [svn diff\]
 
   " Switch back to the top window.
   wincmd k