From e7440df4ecdb7b908996c144fca445f59d96b82b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 1 Dec 2009 20:31:57 +0000 Subject: [PATCH] (comint-insert-input): Ignore clicks to the right of the field. Reported by Bob Nnamtrop . --- lisp/ChangeLog | 3 +++ lisp/comint.el | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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))) -- 2.39.5