From 77c78d88665231970e5eaade43807a28d6b21736 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Mon, 5 Jun 2017 19:50:04 +0200
Subject: Fix a little glitch
---
nncmpp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nncmpp.c b/nncmpp.c
index e973d3f..93c0390 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -2210,7 +2210,10 @@ library_tab_on_data (const struct mpd_response *response,
(int (*) (const void *, const void *)) library_tab_compare);
g_library_tab.super.item_count = items->len;
- app_move_selection (0);
+ // Don't force the selection visible when there's no need to touch it
+ if (g_library_tab.super.item_selected >= (int) items->len)
+ app_move_selection (0);
+
app_invalidate ();
}
--
cgit v1.2.3-70-g09d2