branch: elpa/with-editor
commit 3141aa0e0adb394518b6cbfdd0cfead9e0dbd64c
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
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 a49349af56..c7d74363c0 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