[PATCH 2 of 2] Make g/vim treat the diff window, if it exists, as a 'help' buffer, thereby
Itamar Ravid
iravid at iravid.com
Sat Apr 3 10:17:55 CDT 2010
# HG changeset patch
# User Itamar Ravid <iravid at iravid.com>
# Date 1270307628 -10800
# Node ID 5fc5fafcbcd7a66fe6354dddee8241d52997a776
# Parent 2272a05026eb11f2d52067606729df6d86f18627
Make g/vim treat the diff window, if it exists, as a 'help' buffer, thereby
closing it automatically when :wq'ing the commit message window.
diff -r 2272a05026eb -r 5fc5fafcbcd7 hgeditor
--- a/hgeditor Sat Apr 03 18:12:11 2010 +0300
+++ b/hgeditor Sat Apr 03 18:13:48 2010 +0300
@@ -15,7 +15,11 @@
emacs -nw "$1" "$2"
;;
gvim|vim)
- $EDITOR -f -o "$1" "$2"
+ if [ x$2 != "x" ]; then
+ $EDITOR "+e $2" "+set buftype=help" "+split $1"
+ else
+ $EDITOR "$1"
+ fi
;;
esac
}
More information about the Mercurial
mailing list