Skip to content

Commit 68c03cd

Browse files
racket--get-text-property/bounds: Add bounds check; fixes greghendershott#731
1 parent 22dc95c commit 68c03cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

racket-xp.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ racket-xp-doc and help-echo text properties added by
685685
(defun racket--get-text-property/bounds (pos prop)
686686
"Like `get-text-property' but also returning the bounds."
687687
(when-let (val (get-text-property pos prop))
688-
(let* ((beg (if (not (get-text-property (1- pos) prop))
688+
(let* ((beg (if (or (= 1 pos)
689+
(not (get-text-property (1- pos) prop)))
689690
pos
690691
(previous-single-property-change pos prop)))
691692
(end (or (next-single-property-change beg prop)

0 commit comments

Comments
 (0)