From 93b31a03df89446e485806866b2d1ad25cc22da9 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Sat, 18 Jul 2009 20:27:13 +0430 Subject: [PATCH] term: reset term state before exec --- term.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/term.c b/term.c index ed2b2d1..2980d08 100644 --- a/term.c +++ b/term.c @@ -331,7 +331,9 @@ void term_read(void) void term_exec(char *cmd) { - bot = pad_rows(); + memset(term, 0, sizeof(*term)); + term->cur.bot = term->sav.bot = pad_rows(); + term_load(term, visible); if ((term->pid = forkpty(&term->fd, NULL, NULL, NULL)) == -1) { perror("failed to fork"); term->fd = 0; -- 2.11.4.GIT