emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy 29b61fe1f4 1/2: Guard against degenerate thing-at-p


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy 29b61fe1f4 1/2: Guard against degenerate thing-at-point result
Date: Mon, 26 Sep 2022 08:53:08 -0400 (EDT)

branch: externals/ivy
commit 29b61fe1f4d5268d750b666a7ffc1269e22c6477
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Guard against degenerate thing-at-point result
    
    * ivy.el (ivy-thing-at-point): Check that result of thing-at-point
    is usable.  This works around https://bugs.gnu.org/58091.
---
 ivy.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index d7a23fed96..9b66dac917 100644
--- a/ivy.el
+++ b/ivy.el
@@ -433,7 +433,9 @@ the restoring themselves.")
              (end (region-end))
              (eol (save-excursion (goto-char beg) (line-end-position))))
         (buffer-substring-no-properties beg (min end eol))))
-     ((thing-at-point 'url))
+     ((let ((url (thing-at-point 'url)))
+        ;; Work around `https://bugs.gnu.org/58091'.
+        (and (stringp url) url)))
      ((and (eq (ivy-state-collection ivy-last) #'read-file-name-internal)
            (let ((inhibit-message t)
                  (ffap-machine-p-known 'reject))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]