From 3141aa0e0adb394518b6cbfdd0cfead9e0dbd64c Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Sun, 23 Jun 2024 19:53:19 +0200 Subject: [PATCH] server-visit-files@: Fix removal from file-name-history The entries in `file-name-history' were passed through `abbreviate-file-name', so we have to do the same here. Closes https://github.com/magit/magit/issues/5159. --- lisp/with-editor.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/with-editor.el b/lisp/with-editor.el index a49349a..c7d7436 100644 --- a/lisp/with-editor.el +++ b/lisp/with-editor.el @@ -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