X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.cc;h=0cd620a44e484104bd26031f38c9a5ecc642efb1;hb=e95ec6b1b98bdcb33a296c01af5c15c9f2192834;hp=27225b9cec383205e5ffa3808c7f85f12bf8681b;hpb=2cb82b02fab268f23ce67cee81438a1a0600f20d;p=selector.git diff --git a/selector.cc b/selector.cc index 27225b9..0cd620a 100644 --- a/selector.cc +++ b/selector.cc @@ -349,7 +349,6 @@ void update_screen(int *current_line, int *temporary_line, int motion, int nb_printed_lines = 0; - clear(); use_default_colors(); addstr("\n"); @@ -445,6 +444,8 @@ void update_screen(int *current_line, int *temporary_line, int motion, buffer[k++] = '\n'; buffer[k++] = '\0'; + clrtoeol(); + // Highlight the highlighted line ... if(l == new_line) { @@ -479,6 +480,8 @@ void update_screen(int *current_line, int *temporary_line, int motion, addnstr("[empty choice]\n", console_width); } + clrtobot(); + // Draw the modeline move(0, 0); @@ -996,6 +999,11 @@ int main(int argc, char **argv) { kill_after_cursor(pattern, &cursor_position); } + else if(key == '\014') { // ^L + // I suspect that we may sometime mess up the display + clear(); + } + update_screen(¤t_line, &temporary_line, motion, nb_lines, labels, cursor_position, pattern);