branch: elpa/elfeed
commit 99358a85448ee36a6a6d9c396f78b90171a546a9
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
elfeed-search--completion-table: Minor cleanup
---
elfeed-search.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/elfeed-search.el b/elfeed-search.el
index 54e66d3132..5c0297da41 100644
--- a/elfeed-search.el
+++ b/elfeed-search.el
@@ -663,16 +663,17 @@ Executing a filter in bytecode form is generally faster
than
(let (cache)
(completion-table-dynamic
(lambda (_str)
- (let ((input
+ (let* ((beg (minibuffer-prompt-end))
+ (end (pos-eol))
+ (input
;; Obtain input from the minibuffer to compute dynamic
candidates.
;; We cannot use _str since the argument is always empty for
;; non-basic completion styles like substring or orderless.
(save-excursion
- (goto-char (point-max))
- (when (re-search-backward "\\s-" (minibuffer-prompt-end)
- 'noerror)
- (goto-char (min (1+ (point)) (point-max))))
- (buffer-substring-no-properties (point) (pos-eol)))))
+ (goto-char end)
+ (when (re-search-backward "\\s-" beg 'noerror)
+ (goto-char (min (1+ (point)) end)))
+ (buffer-substring-no-properties (point) end))))
(append
;; Dynamically computed @age candidates.
(when (string-match-p "\\`@[0-9]+" input)