From 5ec53edf02493ba52127bedc508ab53bb5c2b9f4 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 16 Mar 2009 14:38:00 +0100 Subject: [PATCH] Fixed the odd number of lines bug. --- selector.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selector.cc b/selector.cc index de06b45..af8ef84 100644 --- a/selector.cc +++ b/selector.cc @@ -214,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++; -- 2.39.5