]> git.eshelyaron.com Git - emacs.git/commitdiff
Delete, don't kill, dir dir fragments in icomplete-fido-backward-updir
authorJoão Távora <joaotavora@gmail.com>
Sat, 13 Jun 2020 17:45:40 +0000 (18:45 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sat, 13 Jun 2020 17:46:03 +0000 (18:46 +0100)
Reported by: Andrew Schwartzmeyer <andrew@schwartzmeyer.com>

* lisp/icomplete.el (icomplete-fido-backward-updir): Don't save
dir fragments to kill ring.

lisp/icomplete.el

index 60ef0247baebc3de050e03b9be26f7c257c1051a..3747ae3d281806cbee73e48afec6b73c9cb28614 100644 (file)
@@ -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