From: João Távora Date: Sat, 13 Jun 2020 17:45:40 +0000 (+0100) Subject: Delete, don't kill, dir dir fragments in icomplete-fido-backward-updir X-Git-Tag: emacs-27.1-rc1~69 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=079b0dc430ef9e9a6564c7138fd2f319bf9bc7dd;p=emacs.git Delete, don't kill, dir dir fragments in icomplete-fido-backward-updir Reported by: Andrew Schwartzmeyer * lisp/icomplete.el (icomplete-fido-backward-updir): Don't save dir fragments to kill ring. --- diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 60ef0247bae..3747ae3d281 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -300,7 +300,10 @@ if that doesn't produce a completion match." (interactive) (if (and (eq (char-before) ?/) (eq (icomplete--category) 'file)) - (zap-up-to-char -1 ?/) + (save-excursion + (goto-char (1- (point))) + (when (search-backward "/" (point-min) t) + (delete-region (1+ (point)) (point-max)))) (call-interactively 'backward-delete-char))) (defvar icomplete-fido-mode-map