From: handa Date: Fri, 11 Nov 2005 11:25:16 +0000 (+0000) Subject: (compose_glyph_string): Check cursor_pos to decide on X-Git-Tag: REL-1-3-0~77 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=462bf85b19b16bcd3e4b24858dc84ed97c980596;p=m17n%2Fm17n-lib.git (compose_glyph_string): Check cursor_pos to decide on which region to run FLT. --- diff --git a/src/draw.c b/src/draw.c index 2e5d6b8..373b502 100644 --- a/src/draw.c +++ b/src/draw.c @@ -246,6 +246,7 @@ compose_glyph_string (MFrame *frame, MText *mt, int from, int to, MRealizedFont *rfont; int size = gstring->control.fixed_width; int i; + int cursor_pos = gstring->control.cursor_pos; MLIST_RESET (gstring); gstring->from = from; @@ -440,14 +441,19 @@ compose_glyph_string (MFrame *frame, MText *mt, int from, int to, NULL, prev->c) != MCHAR_INVALID_CODE)); start--, prev--) - if (prev->rface->rfont != this->rface->rfont) - { - prev->rface->rfont = this->rface->rfont; - prev->code = code; - } + { + if (prev->rface->rfont != this->rface->rfont) + { + prev->rface->rfont = this->rface->rfont; + prev->code = code; + } + if (prev->pos == cursor_pos) + break; + } for (g++; (g->type == GLYPH_CHAR + && g->pos != cursor_pos && g->rface->layouter == this->rface->layouter && (g->rface->rfont == this->rface->rfont || (g->category == GLYPH_CATEGORY_FORMATTER