projects
/
selector.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not beep when pressing enter.
[selector.git]
/
selector.c
diff --git
a/selector.c
b/selector.c
index
9e09b8a
..
9d39371
100644
(file)
--- a/
selector.c
+++ b/
selector.c
@@
-853,7
+853,7
@@
int main(int argc, char **argv) {
char pattern[BUFFER_SIZE];
int c, k, l, n;
int cursor_position;
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;
int rest_are_files = 0;
int key;
int current_focus_line, displayed_focus_line;
@@
-1206,6
+1206,13
@@
int main(int argc, char **argv) {
clear();
}
clear();
}
+ else if(key == '\007' || /* ^G */
+ key == '\033' || /* ^[ (escape) */
+ key == '\n' ||
+ key == KEY_ENTER) {
+ enter = 1;
+ }
+
else {
/* Unknown key */
error_feedback();
else {
/* Unknown key */
error_feedback();
@@
-1215,10
+1222,7
@@
int main(int argc, char **argv) {
motion,
nb_lines, labels, cursor_position, pattern);
motion,
nb_lines, labels, cursor_position, pattern);
- } while(key != '\007' && /* ^G */
- key != '\033' && /* ^[ (escape) */
- key != '\n' &&
- key != KEY_ENTER);
+ } while(!enter);
echo();
endwin();
echo();
endwin();