From 0224ee5521ab18735e4168ccee5714b5f87395fc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 31 Oct 2009 19:28:16 +0100 Subject: [PATCH] screen_outputs: preserve cursor position after update Don't clear the list_window in clear_outputs_list(). --- src/screen_outputs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/screen_outputs.c b/src/screen_outputs.c index 4a5b2f4..43a9eaa 100644 --- a/src/screen_outputs.c +++ b/src/screen_outputs.c @@ -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 -- 2.30.2