diff lisp/vc-dir.el @ 100475:75d8b06be81f

(vc-at-event): Handle (tool-bar) events. Fix bug#1585.
author Sam Steingold <sds@gnu.org>
date Thu, 18 Dec 2008 03:29:02 +0000
parents ce0076e88ed4
children 15455ea10b4a
line wrap: on
line diff
--- a/lisp/vc-dir.el	Thu Dec 18 01:19:22 2008 +0000
+++ b/lisp/vc-dir.el	Thu Dec 18 03:29:02 2008 +0000
@@ -280,11 +280,12 @@
 If `body' uses `event', it should be a variable,
  otherwise it will be evaluated twice."
   (let ((posn (make-symbol "vc-at-event-posn")))
-    `(let ((,posn (event-start ,event)))
-       (save-excursion
-         (set-buffer (window-buffer (posn-window ,posn)))
-         (goto-char (posn-point ,posn))
-         ,@body))))
+    `(save-excursion
+       (unless (equal ,event '(tool-bar))
+         (let ((,posn (event-start ,event)))
+           (set-buffer (window-buffer (posn-window ,posn)))
+           (goto-char (posn-point ,posn))))
+       ,@body)))
 
 (defun vc-dir-menu (e)
   "Popup the VC dir menu."