From 39545a92dab828d2342c5e4160f30da320d81748 Mon Sep 17 00:00:00 2001 From: Nominate Date: Mon, 5 Aug 2013 18:33:16 +0100 Subject: Added a 'clear' function to the prompt --- testing/toxic/prompt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'testing/toxic/prompt.c') diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index 463b9352..c28980c4 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c @@ -158,7 +158,9 @@ static void execute(ToxWindow* self, char* cmd) { break; } } - + else if(!strcmp(cmd, "clear")) { + wclear(self->window); + } else if(!strcmp(cmd, "help")) { print_usage(self); } @@ -316,7 +318,7 @@ static void print_usage(ToxWindow* self) { wprintw(self->window, " myid : Print your ID\n"); wprintw(self->window, " quit/exit : Exit program\n"); wprintw(self->window, " help : Print this message again\n"); - + wprintw(self->window, " clear: : Clear this window\n"); wattron(self->window, A_BOLD); wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n"); -- cgit v1.2.3