X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.c;h=d7e08204d63867e377254e0204ec30aba631603a;hb=6ccee7147beee31735fe9c7dddb7a91b370f21d5;hp=67a0976b61f0a9ed5ed49e3e10d207aabefba022;hpb=aaa9431132c6bc24f71b54a7ddc4ded7e339ef64;p=selector.git diff --git a/selector.c b/selector.c index 67a0976..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,11 +128,13 @@ void error_feedback() { } } +/*********************************************************************/ + /* A quick and dirty hash table */ -/* The table itself stores indexes of the strings taken in a char - **table. When a string is added, if it was already in the table, - **the new index replaces the previous one. */ +/* The table itself stores indexes of the strings taken in a char** + table. When a string is added, if it was already in the table, the + new index replaces the previous one. */ typedef struct { int size; @@ -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]) {