changeset 19376:40c3e3857458

Fix #2642 (GntTextView Multiline append goes weird)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 23 Aug 2007 07:24:54 +0000
parents f520bf6dd4bc
children d3f2492a7768 70a3aa1f2dd5 90a41215bcb1
files finch/libgnt/gnttextview.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gnttextview.c	Thu Aug 23 07:10:59 2007 +0000
+++ b/finch/libgnt/gnttextview.c	Thu Aug 23 07:24:54 2007 +0000
@@ -549,7 +549,8 @@
 		if ((end = strchr(start, '\r')) != NULL ||
 			(end = strchr(start, '\n')) != NULL) {
 			len = gnt_util_onscreen_width(start, end - has_scroll);
-			if (len >= widget->priv.width - line->length - has_scroll) {
+			if (widget->priv.width > 0 &&
+					len >= widget->priv.width - line->length - has_scroll) {
 				end = NULL;
 			}
 		}