It's more understandable to have nb_printed_lines starting at 0, and to use
directly instead of using nb_printed_lines + 1 after that.
Signed-off-by: Francois Fleuret <francois@fleuret.org>
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
*temporary_line = new_line;
- if(nb_printed_lines == 1) {
+ if(nb_printed_lines == 0) {
addnstr("[no selection]\n", console_width);
}
// Draw the modeline
sprintf(buffer, "%d/%d pattern: %s",
- nb_printed_lines - 1,
+ nb_printed_lines,
nb_lines,
pattern_list);