(find_composition): Fix a code for searching a composition backward.
This commit is contained in:
parent
abb1acc440
commit
d279f62098
2 changed files with 20 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
2000-12-30 Kenichi Handa <handa@etl.go.jp>
|
||||
|
||||
* composite.c (find_composition): Fix a code for searching a
|
||||
composition backward.
|
||||
* composite.c (find_composition): Fix a code for searching
|
||||
backward.
|
||||
|
||||
2000-12-29 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
|
|
|
@ -422,14 +422,25 @@ find_composition (pos, limit, start, end, prop, object)
|
|||
return 0;
|
||||
|
||||
if (limit > pos) /* search forward */
|
||||
val = Fnext_single_property_change (make_number (pos), Qcomposition,
|
||||
object, make_number (limit));
|
||||
{
|
||||
val = Fnext_single_property_change (make_number (pos), Qcomposition,
|
||||
object, make_number (limit));
|
||||
pos = XINT (val);
|
||||
if (pos == limit)
|
||||
return 0;
|
||||
}
|
||||
else /* search backward */
|
||||
val = Fprevious_single_property_change (make_number (pos), Qcomposition,
|
||||
object, make_number (limit));
|
||||
pos = XINT (val);
|
||||
if (pos == limit)
|
||||
return 0;
|
||||
{
|
||||
if (get_property_and_range (pos - 1, Qcomposition, prop, start, end,
|
||||
object))
|
||||
return 1;
|
||||
val = Fprevious_single_property_change (make_number (pos), Qcomposition,
|
||||
object, make_number (limit));
|
||||
pos = XINT (val);
|
||||
if (pos == limit)
|
||||
return 0;
|
||||
pos--;
|
||||
}
|
||||
get_property_and_range (pos, Qcomposition, prop, start, end, object);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue