summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 2ae5e049023..6676e836735 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -799,7 +799,7 @@ buffer. The hook `comint-exec-hook' is run after each exec."
;; for events without parameters.
(interactive (list last-input-event))
(let ((pos (point)))
- (if event (mouse-set-point event))
+ (if event (posn-set-point (event-end event)))
(if (not (eq (get-char-property (point) 'field) 'input))
;; No input at POS, fall back to the global definition.
(let* ((keys (this-command-keys))
@@ -1550,7 +1550,11 @@ Similarly for Soar, Scheme, etc."
;; problems when `comint-prompt-read-only' is non-nil.
(let ((inhibit-read-only t))
(delete-region comint-last-input-end
- (+ comint-last-input-end echo-len))))))
+ (+ comint-last-input-end echo-len))
+ (when comint-prompt-read-only
+ (save-excursion
+ (goto-char comint-last-input-end)
+ (comint-update-fence)))))))
;; This used to call comint-output-filter-functions,
;; but that scrolled the buffer in undesirable ways.