mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-06 12:19:37 +00:00
Fix issue with interpreting ANSI codes in eshell
* lisp/eshell/esh-mode.el (eshell-mode): Make window point advance on insertion. (eshell-output-filter): Don't use insert-before-markers (bug#45380).
This commit is contained in:
parent
50f9436146
commit
85ea3f7f47
1 changed files with 3 additions and 4 deletions
|
@ -315,6 +315,8 @@ and the hook `eshell-exit-hook'."
|
||||||
(setq-local bookmark-make-record-function #'eshell-bookmark-make-record)
|
(setq-local bookmark-make-record-function #'eshell-bookmark-make-record)
|
||||||
(setq local-abbrev-table eshell-mode-abbrev-table)
|
(setq local-abbrev-table eshell-mode-abbrev-table)
|
||||||
|
|
||||||
|
(setq-local window-point-insertion-type t)
|
||||||
|
|
||||||
(setq-local list-buffers-directory (expand-file-name default-directory))
|
(setq-local list-buffers-directory (expand-file-name default-directory))
|
||||||
|
|
||||||
;; always set the tab width to 8 in Eshell buffers, since external
|
;; always set the tab width to 8 in Eshell buffers, since external
|
||||||
|
@ -696,13 +698,10 @@ This is done after all necessary filtering has been done."
|
||||||
(setq oend (+ oend nchars)))
|
(setq oend (+ oend nchars)))
|
||||||
;; Let the ansi-color overlay hooks run.
|
;; Let the ansi-color overlay hooks run.
|
||||||
(let ((inhibit-modification-hooks nil))
|
(let ((inhibit-modification-hooks nil))
|
||||||
(insert-before-markers string))
|
(insert string))
|
||||||
(if (= (window-start) (point))
|
(if (= (window-start) (point))
|
||||||
(set-window-start (selected-window)
|
(set-window-start (selected-window)
|
||||||
(- (point) nchars)))
|
(- (point) nchars)))
|
||||||
(if (= (point) eshell-last-input-end)
|
|
||||||
(set-marker eshell-last-input-end
|
|
||||||
(- eshell-last-input-end nchars)))
|
|
||||||
(set-marker eshell-last-output-start ostart)
|
(set-marker eshell-last-output-start ostart)
|
||||||
(set-marker eshell-last-output-end (point))
|
(set-marker eshell-last-output-end (point))
|
||||||
(force-mode-line-update))
|
(force-mode-line-update))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue