Skip to content

Commit 9210ae5

Browse files
author
Vadim Rodionov
committed
Fix infinite loop in clojure-sexp-starts-until-position
1 parent 906d6a4 commit 9210ae5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clojure-mode.el

+4-2
Original file line numberDiff line numberDiff line change
@@ -2264,8 +2264,10 @@ position before the current position."
22642264
(while (< (point) position)
22652265
(clojure-forward-logical-sexp 1)
22662266
(clojure-backward-logical-sexp 1)
2267-
(push (point) sexp-positions)
2268-
(clojure-forward-logical-sexp 1))
2267+
(if (eq (point) (car sexp-positions))
2268+
(goto-char position)
2269+
(push (point) sexp-positions)
2270+
(clojure-forward-logical-sexp 1)))
22692271
(scan-error nil))
22702272
sexp-positions)))
22712273

0 commit comments

Comments
 (0)