From: Stefan Monnier Date: Tue, 1 Dec 2009 20:31:57 +0000 (+0000) Subject: (comint-insert-input): Ignore clicks to the right of X-Git-Tag: emacs-pretest-23.1.90~131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e7440df4ecdb7b908996c144fca445f59d96b82b;p=emacs.git (comint-insert-input): Ignore clicks to the right of the field. Reported by Bob Nnamtrop . --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b59cfde463b..93634ce6451 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-12-01 Stefan Monnier + * comint.el (comint-insert-input): Ignore clicks to the right of + the field. Reported by Bob Nnamtrop . + * vc.el (vc-print-log-internal): Don't wait for the prcess to terminate before setting up the major mode. diff --git a/lisp/comint.el b/lisp/comint.el index 4dbd58144ea..92bfe24373f 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -828,7 +828,10 @@ by the global keymap (usually `mouse-yank-at-click')." (let ((pos (posn-point (event-end event))) field input) (with-selected-window (posn-window (event-end event)) - (and (setq field (field-at-pos pos)) + ;; If pos is at the very end of a field, the mouse-click was + ;; probably outside (to the right) of the field. + (and (< pos (field-end pos)) + (setq field (field-at-pos pos)) (setq input (field-string-no-properties pos)))) (if (or (null comint-accum-marker) (not (eq field 'input)))