From: Francois Fleuret Date: Mon, 12 Oct 2009 06:03:39 +0000 (+0200) Subject: Cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ccee7147beee31735fe9c7dddb7a91b370f21d5;p=selector.git Cosmetics. --- diff --git a/selector.c b/selector.c index 0bac7b0..d7e0820 100644 --- a/selector.c +++ b/selector.c @@ -67,7 +67,7 @@ int attr_modeline, attr_focus_line, attr_error; /*********************************************************************/ -void inject_into_tty_buffer(char *string) { +void inject_into_tty_buffer(char *string, int add_control_qs) { struct termios oldtio, newtio; const char *k; const char control_q = '\021'; @@ -128,6 +128,8 @@ void error_feedback() { } } +/*********************************************************************/ + /* A quick and dirty hash table */ /* The table itself stores indexes of the strings taken in a char** @@ -1002,7 +1004,6 @@ int main(int argc, char **argv) { initscr(); cbreak(); noecho(); - /* nonl(); */ intrflush(stdscr, FALSE); /* So that the arrow keys work */ @@ -1128,7 +1129,8 @@ int main(int argc, char **argv) { } else if(key == '\014') { /* ^L */ - /* I suspect that we may sometime mess up the display */ + /* I suspect that we may sometime mess up the display, so ^L is + here to force a full refresh */ clear(); } @@ -1161,7 +1163,7 @@ int main(int argc, char **argv) { } if(output_to_vt_buffer && t) { - inject_into_tty_buffer(t); + inject_into_tty_buffer(t, add_control_qs); } if(output_filename[0]) {