Skip to content

Commit 9db997c

Browse files
committed
`dap-ui-eval-variable-in-buffer': check for symbol
That function needs a symbol at point to work. If there is none, `user-error' out instead of sending "null" to the debug adapter.
1 parent 6f32366 commit 9db997c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dap-ui.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,9 @@ request."
863863
(defun dap-ui-eval-variable-in-buffer ()
864864
"Evaluate the symbol at point in a new buffer."
865865
(interactive)
866-
(dap-ui-eval-in-buffer (thing-at-point 'symbol)))
866+
(if-let ((sym (thing-at-point 'symbol)))
867+
(dap-ui-eval-in-buffer sym)
868+
(user-error "`dap-ui-eval-variable-in-buffer': no symbol at point")))
867869

868870
(defvar dap-ui--locals-timer nil)
869871

0 commit comments

Comments
 (0)