branch: externals/vertico
commit f0347b3df5076cde205efcec0148d203df0813c4
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Handle tramp-rfn-eshadow-overlay (Fix #241)
---
 extensions/vertico-directory.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/extensions/vertico-directory.el b/extensions/vertico-directory.el
index 5d0959c248..f0ff824c32 100644
--- a/extensions/vertico-directory.el
+++ b/extensions/vertico-directory.el
@@ -91,13 +91,15 @@
 ;;;###autoload
 (defun vertico-directory-tidy ()
   "Tidy shadowed file name, see `rfn-eshadow-overlay'."
-  (when (and (eq this-command #'self-insert-command)
-             (bound-and-true-p rfn-eshadow-overlay)
-             (overlay-buffer rfn-eshadow-overlay)
-             (= (point) (point-max))
-             (or (>= (- (point) (overlay-end rfn-eshadow-overlay)) 2)
-                 (eq ?/ (char-before (- (point) 2)))))
-    (delete-region (overlay-start rfn-eshadow-overlay) (overlay-end 
rfn-eshadow-overlay))))
+  (when (eq this-command #'self-insert-command)
+    (dolist (ov '(tramp-rfn-eshadow-overlay rfn-eshadow-overlay))
+      (when (and (boundp ov)
+                 (setq ov (symbol-value ov))
+                 (overlay-buffer ov)
+                 (= (point) (point-max))
+                 (or (>= (- (point) (overlay-end ov)) 2)
+                     (eq ?/ (char-before (- (point) 2)))))
+        (delete-region (overlay-start ov) (overlay-end ov))))))
 
 ;; Emacs 28: Do not show Vertico commands in M-X
 (dolist (sym '(vertico-directory-up vertico-directory-enter

Reply via email to