]> git.eshelyaron.com Git - sweep.git/commitdiff
FIXED: sweep_identifier_at_point/2: possible infinite failure loop
authorEshel Yaron <me@eshelyaron.com>
Sat, 15 Oct 2022 07:43:01 +0000 (10:43 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 15 Oct 2022 10:38:23 +0000 (13:38 +0300)
sweep.pl
sweeprolog.el

index 3a9667b9908db88d4ac3591bc37b4c426a2631ab..73dd6682b7827abdeafb0f1546927262e0595a4c 100644 (file)
--- a/sweep.pl
+++ b/sweep.pl
@@ -235,6 +235,7 @@ sweep_identifier_at_point_(Path0, Point, Contents, Identifier) :-
     prolog_colourise_term(Contents, Path,
                           sweep_handle_identifier_at_point(Path, M, Point),
                           []),
+    !,
     sweep_current_identifier_at_point(Identifier0),
     term_string(Identifier0, Identifier).
 
index 190498143cc0631974f22d8d6773139e90ba75ef..6e25e55af456e1dbfaa988774f781608a3d7ae09 100644 (file)
@@ -2505,11 +2505,11 @@ Interactively, POINT is set to the current point."
                 (point)))
          (contents (buffer-substring-no-properties beg end)))
     (sweeprolog-open-query "user"
-                      "sweep"
-                      "sweep_identifier_at_point"
-                      (list contents
-                            (buffer-file-name)
-                            (- p beg)))
+                           "sweep"
+                           "sweep_identifier_at_point"
+                           (list contents
+                                 (buffer-file-name)
+                                 (- p beg)))
     (let ((sol (sweeprolog-next-solution)))
       (sweeprolog-close-query)
       (when (sweeprolog-true-p sol)