textiter: don't read before the line attributes
Backported from GTK 3 commit ca3d87ce70 by Matthias Clasen.
This commit is contained in:
parent
9dc515c29c
commit
15ef87a7b6
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