diff options
author | Timo Sirainen <cras@irssi.org> | 2002-03-14 23:46:48 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-03-14 23:46:48 +0000 |
commit | 6a89217d6a413c4f69c1396f711908fc746083e6 (patch) | |
tree | 36e57dda16152ad259539bbfae4d2a06a7851532 /src/fe-text/term-terminfo.c | |
parent | 85a1b122cdec3edab5dda3cb015613f5ff793a9b (diff) | |
download | irssi-6a89217d6a413c4f69c1396f711908fc746083e6.zip |
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
Diffstat (limited to 'src/fe-text/term-terminfo.c')
-rw-r--r-- | src/fe-text/term-terminfo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 4e9781fe..5716b36c 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -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; |