From: Francois Fleuret Date: Fri, 17 Feb 2012 22:59:15 +0000 (+0100) Subject: Fixed a bug for non-full-width line display. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=7de2ff88a2c8ae9034202235ef20de8265f7d330;p=selector.git Fixed a bug for non-full-width line display. --- diff --git a/selector.c b/selector.c index 24ad55d..2d81071 100644 --- a/selector.c +++ b/selector.c @@ -764,9 +764,10 @@ void update_screen(int *current_focus_line, int *displayed_focus_line, addnstr("\\", 1); attroff(attr_focus_line); } else { - buffer[k++] = '\n'; - buffer[k++] = '\0'; - + if(k < console_width) { + buffer[k++] = '\n'; + buffer[k++] = '\0'; + } print_string_with_switches(buffer, k, nb_switches / 2, switches); }