Vim 7.4 won't let us quit windows from a script.
[profile.git] / .vim / script / p4
index 75dace6..7aa16ba 100644 (file)
@@ -52,6 +52,12 @@ fun! P4submit()
         " Map q to quit easily.
         noremap <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 and put the cursor by the description.
         wincmd k
         resize 10