diff --git a/doom-modeline-env.el b/doom-modeline-env.el index ca9a879..fcb569d 100644 --- a/doom-modeline-env.el +++ b/doom-modeline-env.el @@ -30,6 +30,9 @@ (require 'subr-x) (require 'doom-modeline-core) +;; Externals +(defvar python-shell-interpreter) + ;; Show version string for multi-version managers like rvm, rbenv, pyenv, etc. (defvar-local doom-modeline-env--version nil "The version to display with major-mode in mode-line. diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index a105b83..68f3f4b 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -1020,14 +1020,14 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with (defsubst doom-modeline--symbol-overlay () "Show the number of matches for symbol overlay." - (when (and (bound-and-true-p symbol-overlay-keywords-alist) + (when (and (doom-modeline--active) + (bound-and-true-p symbol-overlay-keywords-alist) (not (bound-and-true-p symbol-overlay-temp-symbol)) (not (bound-and-true-p iedit-mode))) - (let* ((keyword (symbol-overlay-assoc - (ignore-errors (symbol-overlay-get-symbol)))) + (let* ((keyword (symbol-overlay-assoc (symbol-overlay-get-symbol))) (symbol (car keyword)) - (before (symbol-overlay-get-list symbol 'car)) - (after (symbol-overlay-get-list symbol 'cdr)) + (before (symbol-overlay-get-list -1 symbol)) + (after (symbol-overlay-get-list 1 symbol)) (count (length before))) (if (symbol-overlay-assoc symbol) (propertize