From 399433cc2b9500b7ee78503c03cead106b76bbd6 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 19 Dec 2022 19:54:08 +0200 Subject: [PATCH] * lisp/progmodes/project.el: Filter out empty strings from history (bug#58447) (project--read-file-cpd-relative): Do not include empty strings (when prefix has the same length as the string). --- lisp/progmodes/project.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 559da6dd649..605636d93e3 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1045,6 +1045,7 @@ by the user at will." (mapcan (lambda (s) (and (string-prefix-p abbr-cpd s) + (not (eq (length abbr-cpd) (length s))) (list (substring s (length abbr-cpd))))) (symbol-value hist)))) (project--completing-read-strict prompt -- 2.39.2