Commit d279f620 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(find_composition): Fix a code for searching a composition backward.

parent abb1acc4
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment