diff options
Diffstat (limited to 'generic/Text.c')
-rw-r--r-- | generic/Text.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/Text.c b/generic/Text.c index 43907e9..7433fe9 100644 --- a/generic/Text.c +++ b/generic/Text.c @@ -698,9 +698,15 @@ ComputeCoordinates(ZnItem item, cursor_line = -1; ComputeCursor(item, &cursor_line, &cursor_offset); if (cursor_line >= 0) { - box[0].x = origin.x + infos[cursor_line].origin_x + cursor_offset - - wi->text_info.insert_width/2; - box[0].y = origin.y + infos[cursor_line].origin_y - fm.ascent + 1; + if (num_lines) { + box[0].x = origin.x + infos[cursor_line].origin_x + cursor_offset - + wi->text_info.insert_width/2; + box[0].y = origin.y + infos[cursor_line].origin_y - fm.ascent + 1; + } + else { + box[0].x = origin.x; + box[0].y = origin.y; + } box[2].x = box[0].x + wi->text_info.insert_width; box[2].y = box[0].y + font_height - 1; box[1].x = box[2].x; @@ -1112,12 +1118,6 @@ Render(ZnItem item) if (!text->text_info) { return; } - /* - if (!text->tfi) { - if (! (text->tfi = ZnGetTexFont(wi, text->font))) { - return; - } - }*/ #ifdef GL_LIST if (!item->gl_list) { |