From a1197a5c082e9d5a7695f225179e23fb17961dac Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 18 Nov 2001 14:28:04 +0000 Subject: Fixed the "multiple space split" fix :) It was causing crashes, strange that it worked in my tests.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2051 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/textbuffer-view.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/fe-text/textbuffer-view.c') diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index 469d078b..748fd8d6 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -391,19 +391,18 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line, continue; } - if ((*text & 127) >= 32) - term_addch(view->window, *text); - else { - /* low-ascii */ - term_set_color(view->window, ATTR_RESET|ATTR_REVERSE); - term_addch(view->window, (*text & 127)+'A'-1); - term_set_color(view->window, color); + if (xpos < term_width) { + if ((*text & 127) >= 32) + term_addch(view->window, *text); + else { + /* low-ascii */ + term_set_color(view->window, ATTR_RESET|ATTR_REVERSE); + term_addch(view->window, (*text & 127)+'A'-1); + term_set_color(view->window, color); + } } text++; xpos++; - - if (xpos == term_width) - text = text_newline; } if (need_clrtoeol && xpos < term_width) { -- cgit v1.2.3