Cosmetics.
[selector.git] / selector.c
index 67a0976..d7e0820 100644 (file)
@@ -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]) {