diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-12 00:45:36 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-12 00:45:36 -0500 |
| commit | b23016bbe3dd7bbe849105333da9f45bc3f8be24 (patch) | |
| tree | f94c38b443f42841ca358505c4806f9c4ce982d2 /tests/test-mu4e-attachments.el | |
| parent | f1e02c6fcc31d998aaf0e4bf45c6c3623fd9b5f6 (diff) | |
| download | dotemacs-b23016bbe3dd7bbe849105333da9f45bc3f8be24.tar.gz dotemacs-b23016bbe3dd7bbe849105333da9f45bc3f8be24.zip | |
fix(mail): clear the marks after saving from the attachment selector
`cj/mu4e-attachment-selection-save-marked' left the `[x]' marks set after a successful save, so a second `s' silently re-saved the same files. It now unmarks every row and re-renders once the save returns, so the buffer stays open for another batch (and `q'/RET still exit). The save-marked test asserts the marks are cleared.
Diffstat (limited to 'tests/test-mu4e-attachments.el')
| -rw-r--r-- | tests/test-mu4e-attachments.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-mu4e-attachments.el b/tests/test-mu4e-attachments.el index 3105d710..21336f75 100644 --- a/tests/test-mu4e-attachments.el +++ b/tests/test-mu4e-attachments.el @@ -192,7 +192,11 @@ so this fails the same way whether or not mu4e's MIME support is loadable." ((symbol-function 'message) (lambda (&rest _) nil))) (should (equal (cj/mu4e-attachment-selection-save-marked) '("/downloads/b.pdf"))) - (should (equal saved (list (list b) "/downloads/"))))) + (should (equal saved (list (list b) "/downloads/"))) + ;; marks clear after a successful save so `s' won't re-save them + (should-not (seq-some (lambda (entry) (plist-get entry :selected)) + cj/mu4e-attachment-selection-entries)) + (should (string-match-p "\\[ \\] b\\.pdf" (buffer-string))))) (kill-buffer buffer)))) (ert-deftest test-mu4e-attachments-selection-save-marked-errors-when-empty () |
