textiter: gtk_text_iter_inside_sentence no longer reads before the start of the line's attributes
This commit is contained in:
parent
376beeae9d
commit
16d7aefbde
1 changed files with 6 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue