From 015b692d2b6790203c27d606ade255f4c6743f73 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Sat, 13 Jul 2019 01:52:22 +0800 Subject: [PATCH] Don't display debug icon after the debug session is terminated. --- doom-modeline-segments.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 4395d0a..10914ad 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -92,6 +92,7 @@ (declare-function aw-window-list 'ace-window) (declare-function battery-format 'battery) (declare-function dap--cur-session 'dap-mode) +(declare-function dap--session-running 'dap-mode) (declare-function dap-debug-recent 'dap-mode) (declare-function dap-disconnect 'dap-mode) (declare-function dap-hydra 'dap-hydra) @@ -1859,7 +1860,7 @@ mouse-3: Fetch notifications" "The current `dap-mode' state." (when (and (bound-and-true-p dap-mode) (bound-and-true-p lsp-mode) - (dap--cur-session)) + (dap--session-running (dap--cur-session))) (propertize (doom-modeline-debug-icon 'doom-modeline-warning) 'help-echo (format "DAP (%s) mouse-1: Display debug hydra