# HG changeset patch # User Stefan Monnier # Date 1259699517 0 # Node ID d19d1b12196e97f928da9c7b1dc7beafd35134bf # Parent 2e9a20121a4f06114c58f0f1318c9a32efb64e9a (comint-insert-input): Ignore clicks to the right of the field. Reported by Bob Nnamtrop . diff -r 2e9a20121a4f -r d19d1b12196e lisp/ChangeLog --- a/lisp/ChangeLog Tue Dec 01 20:08:20 2009 +0000 +++ b/lisp/ChangeLog Tue Dec 01 20:31:57 2009 +0000 @@ -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 -r 2e9a20121a4f -r d19d1b12196e lisp/comint.el --- a/lisp/comint.el Tue Dec 01 20:08:20 2009 +0000 +++ b/lisp/comint.el Tue Dec 01 20:31:57 2009 +0000 @@ -828,7 +828,10 @@ (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)))