mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
terminfo's term_clrtoeol() uses the clrtoeol() command only when using the default colors. otherwise it just goes and fills the line with spaces.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1941 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
2500457729
commit
3cdedf5b4b
3 changed files with 42 additions and 4 deletions
|
|
@ -177,9 +177,13 @@ void term_window_clear(TERM_WINDOW *window)
|
|||
int y;
|
||||
|
||||
terminfo_set_normal();
|
||||
for (y = 0; y < window->height; y++) {
|
||||
term_move(window, 0, y);
|
||||
term_clrtoeol(window);
|
||||
if (window->y == 0 && window->height == term_height) {
|
||||
term_clear();
|
||||
} else {
|
||||
for (y = 0; y < window->height; y++) {
|
||||
term_move(window, 0, y);
|
||||
term_clrtoeol(window);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -280,7 +284,15 @@ void term_addstr(TERM_WINDOW *window, char *str)
|
|||
|
||||
void term_clrtoeol(TERM_WINDOW *window)
|
||||
{
|
||||
terminfo_clrtoeol();
|
||||
if (last_fg == -1 && last_bg == -1 &&
|
||||
(last_attrs & (ATTR_UNDERLINE|ATTR_REVERSE)) == 0) {
|
||||
/* clrtoeol() doesn't necessarily understand colors */
|
||||
terminfo_clrtoeol();
|
||||
} else if (vcx < term_width) {
|
||||
/* we'll need to fill the line ourself. */
|
||||
terminfo_repeat(' ', term_width-vcx);
|
||||
terminfo_move(vcx, vcy);
|
||||
}
|
||||
}
|
||||
|
||||
void term_move_cursor(int x, int y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue