From 8604c0bbad2ba9a64814a0605e77e1796361538e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Feb 2019 13:55:07 -0500 Subject: [PATCH] Use the default face for vterm's bg/fg --- modules/tools/vterm/config.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/tools/vterm/config.el b/modules/tools/vterm/config.el index ab89ee5ee..e3a8751f9 100644 --- a/modules/tools/vterm/config.el +++ b/modules/tools/vterm/config.el @@ -12,6 +12,14 @@ ;; Automatically kill buffer when vterm exits. (add-to-list 'vterm-exit-functions (lambda (buffer) (if buffer (kill-buffer buffer)))) + (defun +vterm|use-emacs-theme-colors () + "Unset the black and white colors so that vterm's background and foreground +inherit from the `default' face." + (make-local-variable 'ansi-color-names-vector) + (setf (elt ansi-color-names-vector 0) nil) + (setf (elt ansi-color-names-vector 7) nil)) + (add-hook 'vterm-mode-hook #'+vterm|use-emacs-theme-colors) + (when (featurep! :feature evil) (evil-set-initial-state 'vterm-mode 'insert) ;; Go back to normal state but don't move cursor backwards. Moving cursor