From: Eshel Yaron Date: Sat, 15 Oct 2022 07:43:01 +0000 (+0300) Subject: FIXED: sweep_identifier_at_point/2: possible infinite failure loop X-Git-Tag: V8.5.18-sweep-0.6.2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0e575f97bbb91d61f64ce9d785dcb044b7216d91;p=sweep.git FIXED: sweep_identifier_at_point/2: possible infinite failure loop --- diff --git a/sweep.pl b/sweep.pl index 3a9667b..73dd668 100644 --- 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). diff --git a/sweeprolog.el b/sweeprolog.el index 1904981..6e25e55 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -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)