Skip to content

Commit

Permalink
Prevent lockup
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Apr 26, 2024
1 parent 77cac7f commit 884be31
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jinx.el
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,12 @@ FLAG must be t or nil."
(eq flag
(not (and (get-text-property start 'jinx--pending)
(not (invisible-p start))))))
(setq start (next-single-char-property-change
start 'jinx--pending nil
(next-single-char-property-change start 'invisible nil end))))
(let ((pos (next-single-char-property-change
start 'jinx--pending nil
(next-single-char-property-change start 'invisible nil end))))
;; BUG: Make sure that new position is larger than start.
;; Is this an Emacs bug?
(setq start (max pos (1+ start)))))
start)

(defun jinx--check-pending (start end)
Expand Down

0 comments on commit 884be31

Please sign in to comment.