[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico 53a5343757 1/2: vertico-directory-up: Delete on
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vertico 53a5343757 1/2: vertico-directory-up: Delete only before point (Fix #195) |
Date: |
Sat, 12 Feb 2022 11:57:42 -0500 (EST) |
branch: externals/vertico
commit 53a5343757d2d915e8e71079fde845c57d798aa8
Author: daanturo <daanturo@gmail.com>
Commit: Daniel Mendler <mail@daniel-mendler.de>
vertico-directory-up: Delete only before point (Fix #195)
---
extensions/vertico-directory.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/extensions/vertico-directory.el b/extensions/vertico-directory.el
index adcb405eb8..c6f5d219f1 100644
--- a/extensions/vertico-directory.el
+++ b/extensions/vertico-directory.el
@@ -77,10 +77,11 @@
(insert (expand-file-name path)))
(dotimes (_ n found)
(save-excursion
- (goto-char (1- (point)))
- (when (search-backward "/" (minibuffer-prompt-end) t)
- (delete-region (1+ (point)) (point-max))
- (setq found t)))))))
+ (let ((end (point)))
+ (goto-char (1- end))
+ (when (search-backward "/" (minibuffer-prompt-end) t)
+ (delete-region (1+ (point)) end)
+ (setq found t))))))))
;;;###autoload
(defun vertico-directory-delete-char (&optional n)