comparison console/libgnt/gnttextview.c @ 14398:2377498b4698

[gaim-migrate @ 17106] wabz keeps finding bugs i left in the codes. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 01 Sep 2006 06:38:46 +0000
parents 70f52ff1caec
children 28baa42b5ac2
comparison
equal deleted inserted replaced
14397:70f52ff1caec 14398:2377498b4698
1 #include "gnttextview.h" 1 #include "gnttextview.h"
2 #include "gntutils.h" 2 #include "gntutils.h"
3
4 #include <string.h>
3 5
4 enum 6 enum
5 { 7 {
6 SIGS = 1, 8 SIGS = 1,
7 }; 9 };
318 320
319 if (*end == '\n' || *end == '\r') { 321 if (*end == '\n' || *end == '\r') {
320 end++; 322 end++;
321 start = end; 323 start = end;
322 gnt_text_view_next_line(view); 324 gnt_text_view_next_line(view);
325 view->list = g_list_first(view->list);
323 continue; 326 continue;
324 } 327 }
325 328
326 line = view->list->data; 329 line = view->list->data;
327 if ((end = strchr(start, '\n')) != NULL || 330 if ((end = strchr(start, '\n')) != NULL ||
328 (end = strchr(start, '\r')) != NULL) { 331 (end = strchr(start, '\r')) != NULL) {
329 int l = gnt_util_onscreen_width(start, end - 1); 332 len = gnt_util_onscreen_width(start, end - 1);
330 if (l >= widget->priv.width - line->length - 1) { 333 if (len >= widget->priv.width - line->length - 1) {
331 end = NULL; 334 end = NULL;
332 } 335 }
333 } 336 }
334 337
335 if (end == NULL) 338 if (end == NULL)