Code

screen_browser: removed duplicate line clearing
authorThomas Jansen <mithi@mithi.net>
Thu, 29 Oct 2009 09:03:34 +0000 (10:03 +0100)
committerThomas Jansen <mithi@mithi.net>
Thu, 29 Oct 2009 09:03:34 +0000 (10:03 +0100)
whline(w, ' ', width); was used to clean the rest of the line. The new
function row_paint_text takes care of that already, so we don't have to do
it twice. We had to switch the default case to row_paint_text as well to
cover all possibilities.

This fixes a bug where the last digit of the playtime of the last visible
row in the browse screen was overwritten with a space character.

src/screen_browser.c

index 52d76f1a7e5bb2a22799872813c113445b4e7708..985be3898fcd290f4baa38f9d78e6233cfe0058a 100644 (file)
@@ -562,11 +562,10 @@ screen_browser_paint_callback(WINDOW *w, unsigned i,
                break;
 
        default:
-               waddstr(w, "<unknown>");
+               row_paint_text(w, width, highlight ? COLOR_LIST_BOLD : COLOR_LIST,
+                              selected, "<unknown>");
        }
 
-       whline(w, ' ', width);
-
        if (selected)
                wattroff(w, A_REVERSE);
 }