Code

screen_outputs: preserve cursor position after update
authorMax Kellermann <max@duempel.org>
Sat, 31 Oct 2009 18:28:16 +0000 (19:28 +0100)
committerMax Kellermann <max@duempel.org>
Sat, 31 Oct 2009 18:28:16 +0000 (19:28 +0100)
Don't clear the list_window in clear_outputs_list().

src/screen_outputs.c

index 4a5b2f4cdaf4d9a24d2396ff26a6d0e59f6271ed..43a9eaa344569c082bff8535abcaa4bb3e085a2e 100644 (file)
@@ -104,7 +104,11 @@ clear_outputs_list(void)
 
        g_ptr_array_foreach(mpd_outputs, clear_output_element, NULL);
        g_ptr_array_remove_range(mpd_outputs, 0, mpd_outputs->len);
-       list_window_set_length(lw, 0);
+
+       /* not updating the list_window length here, because that
+          would clear the cursor position, and fill_outputs_list()
+          will be called after this function anyway */
+       /* list_window_set_length(lw, 0); */
 }
 
 static void