branch: externals/marginalia commit 95c0bb3a39e9b3db0719aa695efb36291f49e8fe Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Go back and use full minibuffer-contents for marginalia--full-file (Partial revert of 06ae3b4c466801962b7611c851e62bf0c749fbbf) Otherwise we get oddly disappearing annotations in Vertico when moving the cursor as observed by @protesilaos in https://github.com/minad/vertico/pull/7. The argument is that the minibuffer contents are otherwise unchanged and as such should not affect the computation of the full candidate. @oantolin, do you strongly disagree with this change? --- marginalia.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/marginalia.el b/marginalia.el index ffc68b2..446b1a6 100644 --- a/marginalia.el +++ b/marginalia.el @@ -646,15 +646,12 @@ The string is transformed according to `marginalia-bookmark-type-transformers'." (if-let (win (active-minibuffer-window)) (with-current-buffer (window-buffer win) (let* ((contents (minibuffer-contents-no-properties)) - (pt (- (point) (minibuffer-prompt-end))) - (before (substring contents 0 pt)) - (after (substring contents pt)) (bounds (completion-boundaries - before + contents minibuffer-completion-table minibuffer-completion-predicate - after)) - (components (split-string (substring before 0 (car bounds)) "/")) + "")) + (components (split-string (substring contents 0 (car bounds)) "/")) (num-replace (if (string-suffix-p "/" file) (cl-count ?/ file) (1+ (cl-count ?/ file))) ))