Skip to content

Commit 98062b1

Browse files
committed
forge-post-cancel: Offer to delete draft
1 parent ac8ba91 commit 98062b1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lisp/forge-post.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,10 @@ Insert the value of `branch.BRANCH.description' of the source BRANCH."
307307
(save-buffer)
308308
(if-let ((fn forge--cancel-post-function))
309309
(funcall fn forge--buffer-post-object)
310-
(magit-mode-bury-buffer 'kill)))
310+
(let ((file buffer-file-name))
311+
(magit-mode-bury-buffer 'kill)
312+
(when (yes-or-no-p "Also delete draft? ")
313+
(dired-delete-file file nil magit-delete-by-moving-to-trash)))))
311314

312315
(defclass forge--new-topic-set-slot-command (transient-lisp-variable)
313316
((name :initarg :name)

0 commit comments

Comments
 (0)