Prevent xterm-color ansi state from persisting across pages.
authorplugd <plugd@thelambdalab.xyz>
Wed, 2 Feb 2022 21:38:17 +0000 (22:38 +0100)
committerplugd <plugd@thelambdalab.xyz>
Wed, 2 Feb 2022 21:38:17 +0000 (22:38 +0100)
elpher.el

index a869b6a..eb888b6 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -628,7 +628,9 @@ previously-visited pages,unless NO-HISTORY is non-nil."
        ;; avoid resetting buffer-local variables
        (elpher-mode))
      (let ((inhibit-read-only t)
        ;; avoid resetting buffer-local variables
        (elpher-mode))
      (let ((inhibit-read-only t)
-           (ansi-color-context nil)) ;; clean ansi interpreter state
+           (ansi-color-context nil)) ;; clean ansi interpreter state (also next 2 lines)
+       (setq-local xterm-color--current-fg nil)
+       (setq-local xterm-color--current-bg nil)
        (setq-local network-security-level
                    (default-value 'network-security-level))
        (erase-buffer)
        (setq-local network-security-level
                    (default-value 'network-security-level))
        (erase-buffer)