]> code.delx.au - gnu-emacs/commitdiff
* lisp/comint.el (comint-insert-input): Fix last change.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Oct 2011 17:14:04 +0000 (13:14 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Oct 2011 17:14:04 +0000 (13:14 -0400)
lisp/comint.el

index 66749d0f2a84d71fafde0910222a09d90c362de8..591be5e2d9db17c6d6c1b750af2a5d75f253e1e1 100644 (file)
@@ -847,9 +847,10 @@ by the global keymap (usually `mouse-yank-at-click')."
       ;; 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) field)
+          (< (field-end pos) (point-max))
+           (progn (setq field (field-at-pos pos))
+                 (setq input (field-string-no-properties pos)))))
+    (if (or (null input) (null comint-accum-marker) field)
        ;; Fall back to the global definition if (i) the selected
        ;; buffer is not a comint buffer (which can happen if a
        ;; non-comint window was selected and we clicked in a comint