From 2cfbebb3bfb34779588bdfbce7b56ede149610cb Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Wed, 27 May 2009 08:36:26 +0200 Subject: [PATCH] Avoid the blinkings. The update now uses clrtoeol() and clrtobot() instead of clear() so that lines are cleared before being re-displayed, without a global blink. Added the ^L key to refresh the screen globally. --- REVISION_NUMBER | 2 +- selector.cc | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/REVISION_NUMBER b/REVISION_NUMBER index 0d667b5..15c44e9 100644 --- a/REVISION_NUMBER +++ b/REVISION_NUMBER @@ -1 +1 @@ -148 +149 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); -- 2.39.5