int term_init(void)
{
- struct sigaction act;
+ struct sigaction act;
+ int width, height;
last_fg = last_bg = -1;
last_attrs = 0;
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;
void term_deinit(void)
{
if (current_term != NULL) {
+ signal(SIGCONT, SIG_DFL);
g_source_remove(redraw_tag);
term_common_deinit();
vcx += count;
while (vcx >= term_width) {
vcx -= term_width;
- if (vcy < term_height) vcy++;
+ if (vcy < term_height-1) vcy++;
if (vcx > 0) term_lines_empty[vcy] = FALSE;
}
}