Use help buffers in commit and merge scripts.
[profile.git] / .vim / script / svn
index 223d0f0..f648862 100644 (file)
@@ -2,7 +2,7 @@
 " trying to run a sequence of normal mode commands.
 fun! SVNcommit()
   " Allow closing an unmodified spec.
-  set nomod
+  set nomodified
 
   " Get the modified files.  Discount new files.
   let l:files = system("sed -n '1,/^$/d;/^[MR]..../{s//\"/;s/$/\"/p;}' " . bufname(""))
@@ -19,20 +19,16 @@ fun! SVNcommit()
   " Delete the blank line left above the diff.
   1
   delete
-  se nobuflisted
-  set buftype=nowrite
-  set bufhidden=hide
+  set ro
+  set nomodifiable
+  set nomodified
+  set nobuflisted
+  set buftype=help
   setlocal noswapfile
   file [svn diff\]
   " Map q to quit easily.
   nnoremap <silent> <buffer> q <C-W>q
 
-  " Vim 7.4 really doesn't want us to quit windows from a script.
-  try
-    au QuitPre * qa!
-  catch
-  endtry
-
   " Switch back to the top window.
   wincmd k
 endfun