# HG changeset patch # User Michael Albinus # Date 1249287689 0 # Node ID 974fca280203519e0814a6a8a70f72df734d5af9 # Parent a951b4e69c773708edd8eec6d58a07ea9987715b * net/tramp.el (tramp-rfn-eshadow-update-overlay-regexp) New defconst. (tramp-rfn-eshadow-update-overlay): Use it. diff -r a951b4e69c77 -r 974fca280203 lisp/net/tramp.el --- a/lisp/net/tramp.el Sun Aug 02 23:51:54 2009 +0000 +++ b/lisp/net/tramp.el Mon Aug 03 08:21:29 2009 +0000 @@ -2196,6 +2196,9 @@ (remove-hook 'rfn-eshadow-setup-minibuffer-hook 'tramp-rfn-eshadow-setup-minibuffer)))) +(defconst tramp-rfn-eshadow-update-overlay-regexp + (format "[^%s/~]*\\(/\\|~\\)" tramp-postfix-host-format)) + (defun tramp-rfn-eshadow-update-overlay () "Update `rfn-eshadow-overlay' to cover shadowed part of minibuffer input. This is intended to be used as a minibuffer `post-command-hook' for @@ -2209,7 +2212,10 @@ (save-excursion (save-restriction (narrow-to-region - (1+ (or (string-match "/" (buffer-string) end) end)) (point-max)) + (1+ (or (string-match + tramp-rfn-eshadow-update-overlay-regexp (buffer-string) end) + end)) + (point-max)) (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) (rfn-eshadow-update-overlay-hook nil)) (move-overlay rfn-eshadow-overlay (point-max) (point-max))