X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.cc;h=af8ef84bbca6fb7ab9d83b86b5498dae7ec93086;hb=b5301bfe1c4b110dad8788ea822acbd785e9ef7a;hp=f4d79303b68634175f00eb64db4a5e6973793f07;hpb=ef2a722e9da6dc7486797d1324da95e0a88138cf;p=selector.git diff --git a/selector.cc b/selector.cc index f4d7930..af8ef84 100644 --- a/selector.cc +++ b/selector.cc @@ -58,23 +58,6 @@ int remove_duplicates = 0; ////////////////////////////////////////////////////////////////////// -// int test_and_set_hash(char *s, char **hashed, int hash_size) { - // uint32_t code = 0, mask; - // int result; - - // for(int k = 0; s[k]; k++) { - // code += ((uint32_t) (s[k])) << (8 * k%4); - // } - - // code = code%hash_table_size; - - // if(hashed[code]) { - // } else { - // } -// } - -////////////////////////////////////////////////////////////////////// - // This looks severely Linux-only ... void inject_into_tty_buffer(char *line) { @@ -231,7 +214,7 @@ void update_screen(int *current_line, int *temporary_line, int motion, } } - if(last_line < nb_lines - 1) { + if(nb_match < console_height - 1 && last_line < nb_lines - 1) { last_line++; while(last_line < nb_lines - 1 && !match(lines[last_line], nb_patterns, patterns)) { last_line++;