Skip to content

Commit

Permalink
Fix leaking dash replacement props on unbalanced options list
Browse files Browse the repository at this point in the history
  • Loading branch information
svaante committed Dec 1, 2024
1 parent f523773 commit b0987d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dape.el
Original file line number Diff line number Diff line change
Expand Up @@ -5045,6 +5045,8 @@ Where ALIST-KEY exists in `dape-configs'."
(let ((thing (read (current-buffer))))
(cond
((eq thing '-)
(unless (dape--plistp read-config)
(user-error "Expecting complete options list before `-'"))
(cl-loop
with command = (split-string-shell-command
(buffer-substring (point) (point-max)))
Expand All @@ -5065,7 +5067,7 @@ Where ALIST-KEY exists in `dape-configs'."
and return (goto-char (point-max))))
(t
(push thing read-config))))))
;; Try to save half baked plist (value missing)
;; Balance half baked options list
(when (not (dape--plistp read-config))
(pop read-config))
(unless (dape--plistp read-config)
Expand Down

0 comments on commit b0987d0

Please sign in to comment.