mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Get the terminal size at startup with ioctl() and use it. Fixes at least
NetBSD. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2616 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
85a1b122cd
commit
6a89217d6a
3 changed files with 37 additions and 22 deletions
|
|
@ -77,7 +77,8 @@ static int redraw_timeout(void)
|
|||
|
||||
int term_init(void)
|
||||
{
|
||||
struct sigaction act;
|
||||
struct sigaction act;
|
||||
int width, height;
|
||||
|
||||
last_fg = last_bg = -1;
|
||||
last_attrs = 0;
|
||||
|
|
@ -89,6 +90,11 @@ int term_init(void)
|
|||
if (current_term == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (term_get_size(&width, &height)) {
|
||||
current_term->width = width;
|
||||
current_term->height = height;
|
||||
}
|
||||
|
||||
/* grab CONT signal */
|
||||
sigemptyset(&act.sa_mask);
|
||||
act.sa_flags = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue