diff options
| author | Miles Bader | 2000-08-10 10:52:29 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-08-10 10:52:29 +0000 |
| commit | b59b731fa1b84e557db30cc7cc4b4d7ec6e00790 (patch) | |
| tree | 002ee3a083b9f9f87e34b5d11d77f99bc1317e9b | |
| parent | 98532b1215a5fdc5e8fd23c9ba9fdab3d73f665a (diff) | |
| download | emacs-b59b731fa1b84e557db30cc7cc4b4d7ec6e00790.tar.gz emacs-b59b731fa1b84e557db30cc7cc4b4d7ec6e00790.zip | |
(comint-send-input): Make the newline boundary overlay rear-nonsticky.
Use `insert' instead of `insert-before-markers'.
(comint-output-filter): Use `insert' instead of `insert-before-markers'.
Extend comint-last-output-overlay when necessary since we can't rely on
insert-before-markers to do it.
| -rw-r--r-- | lisp/comint.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 15d6a12b335..21e318e2112 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1396,7 +1396,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1396 | 1396 | ||
| 1397 | (if comint-process-echoes | 1397 | (if comint-process-echoes |
| 1398 | (delete-region pmark (point)) | 1398 | (delete-region pmark (point)) |
| 1399 | (insert-before-markers ?\n)) | 1399 | (insert ?\n)) |
| 1400 | 1400 | ||
| 1401 | (if (and (funcall comint-input-filter history) | 1401 | (if (and (funcall comint-input-filter history) |
| 1402 | (or (null comint-input-ignoredups) | 1402 | (or (null comint-input-ignoredups) |
| @@ -1430,6 +1430,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1430 | ;; Make an overlay for the terminating newline | 1430 | ;; Make an overlay for the terminating newline |
| 1431 | (let ((over (make-overlay end (1+ end)))) | 1431 | (let ((over (make-overlay end (1+ end)))) |
| 1432 | (overlay-put over 'field 'boundary) | 1432 | (overlay-put over 'field 'boundary) |
| 1433 | (overlay-put over 'rear-nonsticky t) | ||
| 1433 | (overlay-put over 'evaporate t)))) | 1434 | (overlay-put over 'evaporate t)))) |
| 1434 | 1435 | ||
| 1435 | (comint-snapshot-last-prompt) | 1436 | (comint-snapshot-last-prompt) |
| @@ -1507,16 +1508,21 @@ This variable is permanent-local.") | |||
| 1507 | (setq obeg (+ obeg nchars))) | 1508 | (setq obeg (+ obeg nchars))) |
| 1508 | (if (<= (point) oend) | 1509 | (if (<= (point) oend) |
| 1509 | (setq oend (+ oend nchars))) | 1510 | (setq oend (+ oend nchars))) |
| 1510 | (insert-before-markers string) | 1511 | |
| 1512 | (insert string) | ||
| 1511 | 1513 | ||
| 1512 | (unless comint-use-prompt-regexp-instead-of-fields | 1514 | (unless comint-use-prompt-regexp-instead-of-fields |
| 1513 | ;; We check to see if the last overlay used for output has | 1515 | ;; We check to see if the last overlay used for output has |
| 1514 | ;; already been extended to include STRING (because it was | 1516 | ;; already been extended to include STRING (because it was |
| 1515 | ;; inserted with insert-before-markers?), and only make | 1517 | ;; inserted with insert-before-markers?), and only make |
| 1516 | ;; a new overlay if it hasn't. | 1518 | ;; a new overlay if it hasn't. |
| 1517 | (unless (and comint-last-output-overlay | 1519 | (if (and comint-last-output-overlay |
| 1518 | (equal (overlay-end comint-last-output-overlay) | 1520 | (equal (overlay-end comint-last-output-overlay) ostart)) |
| 1519 | (point))) | 1521 | ;; Extend comint-last-output-overlay to include the |
| 1522 | ;; most recent output | ||
| 1523 | (move-overlay comint-last-output-overlay | ||
| 1524 | (overlay-start comint-last-output-overlay) | ||
| 1525 | (point)) | ||
| 1520 | ;; Create a new overlay | 1526 | ;; Create a new overlay |
| 1521 | (let ((over (make-overlay ostart (point)))) | 1527 | (let ((over (make-overlay ostart (point)))) |
| 1522 | (overlay-put over 'field 'output) | 1528 | (overlay-put over 'field 'output) |