From 290a43efdaf8760f5ac587c6c49ea853279384d3 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 22 Jan 2014 22:32:40 +0000 Subject: [cmdline] Always clear screen after reconfiguring console Signed-off-by: Michael Brown --- src/hci/commands/console_cmd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/hci') diff --git a/src/hci/commands/console_cmd.c b/src/hci/commands/console_cmd.c index 957c5aa0..db413686 100644 --- a/src/hci/commands/console_cmd.c +++ b/src/hci/commands/console_cmd.c @@ -32,6 +32,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include #include #include +#include #include #include @@ -114,6 +115,10 @@ static int console_exec ( int argc, char **argv ) { goto err_configure; } + /* Reapply default colour pair and clear screen */ + ansicol_set_pair ( CPAIR_DEFAULT ); + printf ( CSI "2J" CSI "H" ); + err_configure: pixbuf_put ( opts.config.pixbuf ); err_pixbuf: -- cgit v1.2.3-55-g7522