branch: externals/dape
commit 371e88daec0cf971a39aaaef964565e51713ad2a
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>

    Fix issue where stack shows stack trace even if continued
---
 dape.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/dape.el b/dape.el
index dceda60b69..5b2d07b1df 100644
--- a/dape.el
+++ b/dape.el
@@ -3051,11 +3051,13 @@ Buffer is specified by MODE and ID."
 (cl-defmethod dape--info-buffer-update (conn (mode (eql dape-info-stack-mode)) 
id)
   "Fetches data for `dape-info-stack-mode' and updates buffer.
 Buffer is specified by MODE and ID."
-  (let ((stack-frames (plist-get (dape--current-thread conn) :stackFrames))
-        (current-stack-frame (dape--current-stack-frame conn)))
-    (dape--info-buffer-update-1 mode id
-                                :current-stack-frame current-stack-frame
-                                :stack-frames stack-frames)))
+  (if (dape--stopped-threads conn)
+      (let ((stack-frames (plist-get (dape--current-thread conn) :stackFrames))
+            (current-stack-frame (dape--current-stack-frame conn)))
+        (dape--info-buffer-update-1 mode id
+                                    :current-stack-frame current-stack-frame
+                                    :stack-frames stack-frames))
+    (dape--info-buffer-update-1 mode id)))
 
 (cl-defmethod dape--info-buffer-update-contents
   (&context (major-mode dape-info-stack-mode) &key current-stack-frame 
stack-frames)
@@ -3065,7 +3067,7 @@ Updates from CURRENT-STACK-FRAME STACK-FRAMES."
   (cond
    ((or (not current-stack-frame)
         (not stack-frames))
-    (insert "No stopped thread."))
+    (insert "No stopped threads."))
    (t
     (cl-loop with table = (make-gdb-table)
              for frame in stack-frames

Reply via email to