From 64f1cf5de1689b76f04575758c07a74f1e9727a0 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Tue, 2 Apr 2019 00:23:08 +0800 Subject: [PATCH] Fix invalid sate icon in org-narrow. narrow-to-region doesn't work in org-narrow-to-subtree, org-narrow-to-block, org-narrow-to-element. Don't know the root cause. --- doom-modeline-segments.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 3fd4452..a4cf172 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -286,6 +286,9 @@ Uses `all-the-icons-material' to fetch the icon." (advice-add #'widen :after #'doom-modeline-update-buffer-file-state-icon) (advice-add #'fancy-narrow-to-region :after #'doom-modeline-update-buffer-file-state-icon) (advice-add #'fancy-widen :after #'doom-modeline-update-buffer-file-state-icon) +(advice-add #'org-narrow-to-subtree :after #'doom-modeline-update-buffer-file-state-icon) +(advice-add #'org-narrow-to-block :after #'doom-modeline-update-buffer-file-state-icon) +(advice-add #'org-narrow-to-element :after #'doom-modeline-update-buffer-file-state-icon) (when (>= emacs-major-version 26) (add-variable-watcher