Code

Clear top window when the header changes.
authorKalle Wallin <kaw@linux.se>
Sun, 28 Mar 2004 14:53:22 +0000 (14:53 +0000)
committerKalle Wallin <kaw@linux.se>
Sun, 28 Mar 2004 14:53:22 +0000 (14:53 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@521 09075e82-0dd4-0310-85a5-a0d7c8717e4f

screen.c

index 7e3e51d7ffdaf9e473e30d485d73926e3ffc7e56..8d14376ff95c5650950f32023e1b7c605b68c0f8 100644 (file)
--- a/screen.c
+++ b/screen.c
@@ -68,8 +68,15 @@ static void
 paint_top_window(char *header, int volume, int clear)
 {
   static int prev_volume = -1;
+  static int prev_header_len = -1;
   WINDOW *w = screen->top_window.w;
 
+  if(prev_header_len!=strlen(header))
+    {
+      prev_header_len = strlen(header);
+      clear = 1;
+    }
+
   if(clear)
     {
       wclear(w);