Skip to content

Commit

Permalink
A better fix for minad#156
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Jun 26, 2024
1 parent 8527880 commit 7a7f5f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jinx.el
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,13 @@ 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
(let ((next (next-single-char-property-change
start 'jinx--pending nil
(next-single-char-property-change start 'invisible nil end))))
;; END can be outside the buffer if the buffer size has changed in
;; between. Then `next-single-property-change' will return (point-max)
;; instead of END. See gh:minad/jinx#156.
(setq start (if (> next start) next end))))
start)

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

0 comments on commit 7a7f5f0

Please sign in to comment.