textiter: gtk_text_iter_inside_sentence no longer reads before the start of the line's attributes

This commit is contained in:
Daemonratte 2026-10-16 13:45:38 +02:00
commit 16d7aefbde
No known key found for this signature in database

View file

@ -3003,9 +3003,12 @@ inside_sentence_func (const PangoLogAttr *attrs,
gint len)
{
/* Find next sentence start or end */
while (offset >= min_offset &&
!(attrs[offset].is_sentence_start || attrs[offset].is_sentence_end))
--offset;
while (!(attrs[offset].is_sentence_start || attrs[offset].is_sentence_end))
{
--offset;
if (offset < min_offset)
return FALSE;
}
return attrs[offset].is_sentence_start;
}