diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-15 21:52:30 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-15 21:52:30 -0500 |
| commit | ea46c4a90c9f2de94cdb6ab4e47e744a9506ee37 (patch) | |
| tree | 46bce18474facc12ba12a8808cf5373d1a9ea84d /modules | |
| parent | a7acefc5065558de2d301700c23d71f83bffdc83 (diff) | |
| download | dotemacs-ea46c4a90c9f2de94cdb6ab4e47e744a9506ee37.tar.gz dotemacs-ea46c4a90c9f2de94cdb6ab4e47e744a9506ee37.zip | |
fix(ui-navigation): undo-kill-buffer skips open files via equal
The visited-file filter used delq, comparing expand-file-name strings by eq, so an already-open file was never removed from the candidates (the skip logic was dead). Use delete (equal). Adds a test with the open file at the head of the list, where the eq/equal difference actually shows.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/ui-navigation.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/ui-navigation.el b/modules/ui-navigation.el index fba9153c2..e9c9eaf26 100644 --- a/modules/ui-navigation.el +++ b/modules/ui-navigation.el @@ -203,8 +203,11 @@ With numeric prefix ARG, re-open the ARGth most-recently-killed file (buffer-list))))) (mapc (lambda (buf-file) + ;; delete (equal), not delq (eq): buf-file is a fresh string from + ;; expand-file-name and never eq to the recentf-list entries, so the + ;; skip-open-files logic was dead. (setq recently-killed-list - (delq buf-file recently-killed-list))) + (delete buf-file recently-killed-list))) buffer-files-list) (when recently-killed-list (let ((file (nth (1- arg) recently-killed-list))) |
