Skip to content

Commit

Permalink
server-visit-files@: Fix removal from file-name-history
Browse files Browse the repository at this point in the history
The entries in `file-name-history' were passed through
`abbreviate-file-name', so we have to do the same here.

Closes magit/magit#5159.
  • Loading branch information
tarsius committed Jun 23, 2024
1 parent f5157d6 commit 3141aa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/with-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,8 @@ are prevented from being added to that list."
(when (cl-find-if (lambda (regexp)
(string-match-p regexp file))
with-editor-file-name-history-exclude)
(setq file-name-history (delete file file-name-history)))))
(setq file-name-history
(delete (abbreviate-file-name file) file-name-history)))))

;;; Augmentations

Expand Down

0 comments on commit 3141aa0

Please # to comment.