char pattern[BUFFER_SIZE];
int c, k, l, n;
int cursor_position;
- int error = 0, show_help = 0;
+ int error = 0, show_help = 0, enter = 0;
int rest_are_files = 0;
int key;
int current_focus_line, displayed_focus_line;
clear();
}
+ else if(key == '\007' || /* ^G */
+ key == '\033' || /* ^[ (escape) */
+ key == '\n' ||
+ key == KEY_ENTER) {
+ enter = 1;
+ }
+
else {
/* Unknown key */
error_feedback();
motion,
nb_lines, labels, cursor_position, pattern);
- } while(key != '\007' && /* ^G */
- key != '\033' && /* ^[ (escape) */
- key != '\n' &&
- key != KEY_ENTER);
+ } while(!enter);
echo();
endwin();