From 70f2eee603a8f3e9b490b52c2cec06c5822dc993 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 16 Oct 2006 00:37:43 +0000 Subject: [PATCH] (draw_background): Be sure to set *to_x. (render_glyph_string): If from == to, just return. --- src/draw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/draw.c b/src/draw.c index ebd6544..8e88cc2 100644 --- a/src/draw.c +++ b/src/draw.c @@ -1112,6 +1112,7 @@ draw_background (MFrame *frame, MDrawWindow win, int x, int y, } *from_idx = *to_idx = 0; + *to_x = x; while (g->type != GLYPH_ANCHOR) { if (g->pos >= from && g->pos < to) @@ -1434,6 +1435,8 @@ render_glyph_string (MFrame *frame, MDrawWindow win, int x, int y, int from_idx, to_idx; int to_x; + if (from == to) + return; if (control->orientation_reversed) x -= gstring->indent + gstring_width (gstring, from, to, NULL, NULL); else -- 1.7.10.4