diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-18 14:28:04 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-18 14:28:04 +0000 |
commit | a1197a5c082e9d5a7695f225179e23fb17961dac (patch) | |
tree | 2efe7fc78ec815457c86776a4756a21d6e66b17d /src/fe-text/textbuffer-view.c | |
parent | bfe3e83b62758d9ab5f342ab077e3c4e10f1606c (diff) | |
download | irssi-a1197a5c082e9d5a7695f225179e23fb17961dac.zip |
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
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r-- | src/fe-text/textbuffer-view.c | 19 |
1 files changed, 9 insertions, 10 deletions
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) { |