diff options
author | Timo Sirainen <cras@irssi.org> | 2001-10-28 21:17:34 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-10-28 21:17:34 +0000 |
commit | 858ed4b1ef5869e2d2ba28d08c0b2397447618af (patch) | |
tree | f46709322ad27b98169579561e48d8ed8ac98457 /src/fe-text/term-terminfo.c | |
parent | 3826079dbab92df9fcab1430b9eee90bc8a2eb32 (diff) | |
download | irssi-858ed4b1ef5869e2d2ba28d08c0b2397447618af.zip |
Some resize fixes. With terminfo + /SET indent_always OFF, doubleclicking
long words (URLs mostly) that get split into two lines, selects the word
fully.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1929 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/term-terminfo.c')
-rw-r--r-- | src/fe-text/term-terminfo.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index bf9fd22e..9beccbf0 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -114,10 +114,14 @@ void term_resize(int width, int height) vcx = vcy = -1; } +void term_resize_final(int width, int height) +{ +} + /* Returns TRUE if terminal has colors */ int term_has_colors(void) { - return terminfo_has_colors(current_term); + return current_term->has_colors; } /* Force the colors on any way you can */ @@ -217,7 +221,8 @@ void term_set_color(TERM_WINDOW *window, int col) if ((col & 0x0f) != last_fg && ((col & 0x0f) != 0 || (col & ATTR_RESETFG) == 0)) { last_fg = col & 0x0f; - terminfo_set_fg(last_fg); + if (term_use_colors) + terminfo_set_fg(last_fg); } /* set background color */ @@ -229,7 +234,8 @@ void term_set_color(TERM_WINDOW *window, int col) if ((col & 0xf0) >> 4 != last_bg && ((col & 0xf0) != 0 || (col & ATTR_RESETBG) == 0)) { last_bg = (col & 0xf0) >> 4; - terminfo_set_bg(last_bg); + if (term_use_colors) + terminfo_set_bg(last_bg); } /* bold */ @@ -263,19 +269,13 @@ void term_move(TERM_WINDOW *window, int x, int y) void term_addch(TERM_WINDOW *window, int chr) { putc(chr, window->term->out); - if (++vcx == window->width) { - vcx = 0; vcy++; - } + vcx++; /* ignore if cursor gets past the screen */ } void term_addstr(TERM_WINDOW *window, char *str) { fputs(str, window->term->out); - vcx += strlen(str); - while (vcx > window->width) { - vcx -= window->width; - vcy++; - } + vcx += strlen(str); /* ignore if cursor gets past the screen */ } void term_clrtoeol(TERM_WINDOW *window) |