branch: externals/marginalia
commit 2d1949778213ea5fa5f43be426e0c625ff419dd8
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>
    marginalia--full-file: Ensure that pt >= 0 if cursor is moved into the 
prompt
---
 marginalia.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/marginalia.el b/marginalia.el
index b9404c7..d4a676f 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -646,7 +646,7 @@ 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)))
+               (pt (max 0 (- (point) (minibuffer-prompt-end))))
                (before (substring contents 0 pt))
                (after (substring contents pt))
                ;; BUG: `completion-boundaries` fails for `partial-completion`

Reply via email to