Skip to content

Commit 6f3fb3b

Browse files
committed
Handle carriage return using comint
fixes #13
1 parent 0deeac9 commit 6f3fb3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lisp/ein-cell.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
(eval-when-compile (require 'cl))
3535
(require 'eieio)
3636
(require 'ansi-color)
37+
(require 'comint)
3738

3839
(require 'ein-log)
3940
(require 'ein-utils)
@@ -668,7 +669,9 @@ Called from ewoc pretty printer via `ein:cell-insert-output'."
668669
Called from ewoc pretty printer via `ein:cell-insert-output'."
669670
(unless (plist-get json :stream)
670671
(plist-put json :stream "stdout"))
671-
(ein:cell-append-stream-text-fontified (plist-get json :text) json)
672+
(let ((start (point)))
673+
(ein:cell-append-stream-text-fontified (plist-get json :text) json)
674+
(comint-carriage-motion start (point)))
672675
;; NOTE: newlines for stream is handled in `ein:cell-insert-output'.
673676
;; So do not insert newline here.
674677
)

0 commit comments

Comments
 (0)