X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.cc;h=f4d79303b68634175f00eb64db4a5e6973793f07;hb=ef2a722e9da6dc7486797d1324da95e0a88138cf;hp=5ce4c4e857ae62709703a691cacbc9c51e558cb8;hpb=f6c5adbccb010de3ffa461208dff84ecd23a8687;p=selector.git diff --git a/selector.cc b/selector.cc index 5ce4c4e..f4d7930 100644 --- a/selector.cc +++ b/selector.cc @@ -208,7 +208,7 @@ void update_screen(int *current_line, int *temporary_line, int motion, addstr("\n"); - int nb_printed_lines = 1; + int nb_printed_lines = 0; // Here new_line is either a line number matching the patterns, or -1 @@ -293,15 +293,14 @@ void update_screen(int *current_line, int *temporary_line, int motion, *temporary_line = new_line; - if(nb_printed_lines == 1) { + if(nb_printed_lines == 0) { addnstr("[no selection]\n", console_width); - nb_printed_lines++; } // Draw the modeline sprintf(buffer, "%d/%d pattern: %s", - nb_printed_lines - 1, + nb_printed_lines, nb_lines, pattern_list);