mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Fixes some potential issues with invalid term size in clients.
This commit is contained in:
parent
33be3ba713
commit
4d4979c67c
@ -148,8 +148,8 @@ input_init(void)
|
||||
rl_callback_handler_install("bird> ", input_got_line);
|
||||
|
||||
// rl_get_screen_size();
|
||||
term_lns = LINES ? LINES : 25;
|
||||
term_cls = COLS ? COLS : 80;
|
||||
term_lns = LINES;
|
||||
term_cls = COLS;
|
||||
|
||||
prompt_active = 1;
|
||||
|
||||
|
@ -150,11 +150,6 @@ input_init(void)
|
||||
term_lns = tws.ws_row;
|
||||
term_cls = tws.ws_col;
|
||||
}
|
||||
else
|
||||
{
|
||||
term_lns = 25;
|
||||
term_cls = 80;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -178,6 +178,10 @@ init_commands(void)
|
||||
}
|
||||
|
||||
input_init();
|
||||
|
||||
term_lns = (term_lns > 0) ? term_lns : 25;
|
||||
term_cls = (term_cls > 0) ? term_cls : 80;
|
||||
|
||||
init = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user