1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Use TCSADRAIN option when changing terminfo settings.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1928 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-28 19:20:59 +00:00 committed by cras
parent 83324a0ed5
commit 3826079dba
2 changed files with 7 additions and 6 deletions

View File

@ -83,7 +83,7 @@ static int init_curses(void)
#ifdef VSUSP
tio.c_cc[VSUSP] = _POSIX_VDISABLE;
#endif
tcsetattr(0, 0, &tio);
tcsetattr(0, TCSADRAIN, &tio);
}
if (has_colors())
@ -131,7 +131,7 @@ static int term_init_int(void)
static void term_deinit_int(void)
{
tcsetattr(0, 0, &old_tio);
tcsetattr(0, TCSADRAIN, &old_tio);
endwin();
g_free_and_null(root_window);

View File

@ -364,7 +364,7 @@ static void terminfo_colors_deinit(TERM_REC *term)
{
int i;
if (terminfo_has_colors(term)) {
if (terminfo_is_colors_set(term)) {
for (i = 0; i < 16; i++) {
g_free(term->TI_fg[i]);
g_free(term->TI_bg[i]);
@ -383,7 +383,8 @@ void terminfo_setup_colors(TERM_REC *term, int force)
const char *bold, *blink;
int i;
terminfo_colors_deinit(term);
terminfo_colors_deinit(term);
term->has_colors = term->TI_setf || term->TI_setaf;
if (term->TI_setf) {
for (i = 0; i < 8; i++)
@ -444,13 +445,13 @@ static void terminfo_input_init(TERM_REC *term)
term->tio.c_cc[VSUSP] = _POSIX_VDISABLE;
#endif
tcsetattr(fileno(term->in), 0, &term->tio);
tcsetattr(fileno(term->in), TCSADRAIN, &term->tio);
}
static void terminfo_input_deinit(TERM_REC *term)
{
tcsetattr(fileno(term->in), 0, &term->old_tio);
tcsetattr(fileno(term->in), TCSADRAIN, &term->old_tio);
}
void terminfo_cont(TERM_REC *term)