mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Let ansi-color overlay hooks work in eshell (Bug#27407)
* lisp/ansi-color.el (ansi-color-make-extent): Add `ansi-color-freeze-overlay' to `insert-behind-hooks' as well. * lisp/eshell/esh-mode.el (eshell-output-filter): Let-bind `inhibit-modification-hooks' to nil while inserting the string.
This commit is contained in:
parent
35ed01dfb3
commit
4ebdcc46ab
2 changed files with 4 additions and 1 deletions
|
|
@ -481,6 +481,7 @@ Emacs requires OBJECT to be a buffer."
|
|||
;; property to make sure it works.
|
||||
(let ((overlay (make-overlay from to object)))
|
||||
(overlay-put overlay 'modification-hooks '(ansi-color-freeze-overlay))
|
||||
(overlay-put overlay 'insert-behind-hooks '(ansi-color-freeze-overlay))
|
||||
overlay)))
|
||||
|
||||
(defun ansi-color-freeze-overlay (overlay is-after begin end &optional len)
|
||||
|
|
|
|||
|
|
@ -726,7 +726,9 @@ This is done after all necessary filtering has been done."
|
|||
(setq obeg (+ obeg nchars)))
|
||||
(if (<= (point) oend)
|
||||
(setq oend (+ oend nchars)))
|
||||
(insert-before-markers string)
|
||||
;; Let the ansi-color overlay hooks run.
|
||||
(let ((inhibit-modification-hooks nil))
|
||||
(insert-before-markers string))
|
||||
(if (= (window-start) (point))
|
||||
(set-window-start (selected-window)
|
||||
(- (point) nchars)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue