X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.cc;h=bd50899562d76de21636d462d1ca6dfe7e8dc9ed;hb=c132a9e079b9acabfdc5737ff54ba2be6931a769;hp=7b51ce30a19de22ce0baa6f2f63ceb38695e85da;hpb=043d4e30275d5a1eb42a69d491ab009d01a76685;p=selector.git diff --git a/selector.cc b/selector.cc index 7b51ce3..bd50899 100644 --- a/selector.cc +++ b/selector.cc @@ -582,8 +582,10 @@ void read_file(const char *input_filename, // Remove the bash history prefix - if(bash_history && (*t == ' ' || (*t >= '0' && *t <= '9'))) { - while(*t == ' ' || (*t >= '0' && *t <= '9')) t++; + if(bash_history) { + while(*t == ' ') t++; + while(*t >= '0' && *t <= '9') t++; + while(*t == ' ') t++; } // Copy the string while transforming the ctrl characters into @@ -712,6 +714,8 @@ int main(int argc, char **argv) { } else if(strcmp(argv[i], "-a") == 0) { + case_sensitive = 1; + i++; } else if(strcmp(argv[i], "-t") == 0) { @@ -961,7 +965,10 @@ int main(int argc, char **argv) { update_screen(¤t_line, &temporary_line, motion, nb_lines, lines, cursor_position, pattern); - } while(key != '\n' && key != KEY_ENTER && key != '\007'); // ^G + } while(key != '\007' && // ^G + key != '\033' && // ^[ (escape) + key != '\n' && + key != KEY_ENTER); echo(); endwin();