Fixes some potential issues with invalid term size in clients.
This commit is contained in:
parent
33be3ba713
commit
4d4979c67c
3 changed files with 6 additions and 7 deletions
|
@ -148,8 +148,8 @@ input_init(void)
|
||||||
rl_callback_handler_install("bird> ", input_got_line);
|
rl_callback_handler_install("bird> ", input_got_line);
|
||||||
|
|
||||||
// rl_get_screen_size();
|
// rl_get_screen_size();
|
||||||
term_lns = LINES ? LINES : 25;
|
term_lns = LINES;
|
||||||
term_cls = COLS ? COLS : 80;
|
term_cls = COLS;
|
||||||
|
|
||||||
prompt_active = 1;
|
prompt_active = 1;
|
||||||
|
|
||||||
|
|
|
@ -150,11 +150,6 @@ input_init(void)
|
||||||
term_lns = tws.ws_row;
|
term_lns = tws.ws_row;
|
||||||
term_cls = tws.ws_col;
|
term_cls = tws.ws_col;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
term_lns = 25;
|
|
||||||
term_cls = 80;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -178,6 +178,10 @@ init_commands(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
input_init();
|
input_init();
|
||||||
|
|
||||||
|
term_lns = (term_lns > 0) ? term_lns : 25;
|
||||||
|
term_cls = (term_cls > 0) ? term_cls : 80;
|
||||||
|
|
||||||
init = 0;
|
init = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue