[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dape 89f5b347bf 4/8: Add command and bindings for movin
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/dape 89f5b347bf 4/8: Add command and bindings for moving up and down the stack |
|
Date: |
Mon, 15 Jan 2024 15:58:13 -0500 (EST) |
branch: externals/dape
commit 89f5b347bf8d3031f8bf8ad4e151006eb9d00d11
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>
Add command and bindings for moving up and down the stack
---
dape.el | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/dape.el b/dape.el
index a39ffdc4aa..4f0a26f1de 100644
--- a/dape.el
+++ b/dape.el
@@ -1963,6 +1963,26 @@ SKIP-TYPES is a list of overlay properties to skip
removal of."
(setf (dape--stack-id conn) stack-id)
(dape--update conn t))
+(defun dape-stack-select-up (conn n)
+ "Select N stacks above current selected stack for adapter CONN."
+ (interactive (list (dape--live-connection) 1))
+ (if (dape--stopped-threads conn)
+ (let* ((current-stack (dape--current-stack-frame conn))
+ (stacks (plist-get (dape--current-thread conn) :stackFrames))
+ (i (cl-loop for i upfrom 0
+ for stack in stacks
+ when (equal stack current-stack)
+ return (+ i n))))
+ (if (not (and (<= 0 i) (< i (length stacks))))
+ (message "Index %s out of range" i)
+ (dape-select-stack conn (plist-get (nth i stacks) :id))))
+ (message "No stopped threads")))
+
+(defun dape-stack-select-down (conn n)
+ "Select N stacks below current selected stack for adapter CONN."
+ (interactive (list (dape--live-connection) 1))
+ (dape-stack-select-up conn (* n -1)))
+
(defun dape-watch-dwim (expression &optional skip-add skip-remove)
"Add or remove watch for EXPRESSION.
Watched symbols are displayed in *`dape-info' Watch* buffer.
@@ -3964,6 +3984,8 @@ See `eldoc-documentation-functions', for more infomation."
(define-key map "B" #'dape-breakpoint-remove-all)
(define-key map "t" #'dape-select-thread)
(define-key map "S" #'dape-select-stack)
+ (define-key map (kbd "C-i") #'dape-stack-select-down)
+ (define-key map (kbd "C-o") #'dape-stack-select-up)
(define-key map "w" #'dape-watch-dwim)
(define-key map "D" #'dape-disconnect-quit)
(define-key map "q" #'dape-quit)
@@ -3980,6 +4002,8 @@ See `eldoc-documentation-functions', for more infomation."
dape-breakpoint-expression
dape-breakpoint-toggle
dape-breakpoint-remove-all
+ dape-stack-select-up
+ dape-stack-select-down
dape-watch-dwim))
(put cmd 'repeat-map 'dape-global-map))
- [elpa] externals/dape updated (12e6753d61 -> 10c78cefd4), ELPA Syncer, 2024/01/15
- [elpa] externals/dape 89f5b347bf 4/8: Add command and bindings for moving up and down the stack,
ELPA Syncer <=
- [elpa] externals/dape a9bf37fb6c 5/8: Fix test according to remove stack index, ELPA Syncer, 2024/01/15
- [elpa] externals/dape 0eec368036 1/8: Change defaults for open source buffer, ELPA Syncer, 2024/01/15
- [elpa] externals/dape c8e8869e92 3/8: Only display stack exception on deepest stack frame overlay, ELPA Syncer, 2024/01/15
- [elpa] externals/dape d04d6b5e53 6/8: Kill buffers on dape-quit no matter what, ELPA Syncer, 2024/01/15
- [elpa] externals/dape ab1408ff88 7/8: Add binding for evaluate command, ELPA Syncer, 2024/01/15
- [elpa] externals/dape 7537177271 2/8: Improve exception printing use both repl and in buffer, ELPA Syncer, 2024/01/15
- [elpa] externals/dape 10c78cefd4 8/8: Fix doc issues, ELPA Syncer, 2024/01/15