From 729e61a3864afdfa1972abf42365f755786be097 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 7 Mar 2019 15:19:54 +0700 Subject: [PATCH] Fix: invalid symbol-overlay segment. The API symbol-overlay-get-list was changed in https://github.com/wolray/symbol-overlay/commit/ad77d6cd1e48adc7345503ca86f3e81877033703. --- doom-modeline-env.el | 3 +++ doom-modeline-segments.el | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) 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