Commit 5e37ffcacef69059e5368141449302ddeccccbb6

Stefan Sperling 2019-02-25T16:48:56

fix scrolling-up regression in tog tree view

diff --git a/tog/tog.c b/tog/tog.c
index 8bf29ee..1d91082 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -3382,8 +3382,10 @@ tree_scroll_up(struct tog_view *view,
 	struct got_tree_entry *te, *prev;
 	int i;
 
-	if (*first_displayed_entry == NULL)
+	if (*first_displayed_entry == NULL) {
+		view_flash(view);
 		return;
+	}
 
 	te = SIMPLEQ_FIRST(&entries->head);
 	if (*first_displayed_entry == te) {
@@ -3651,10 +3653,6 @@ input_tree_view(struct tog_view **new_view, struct tog_view **dead_view,
 			break;
 		case 'k':
 		case KEY_UP:
-			if (s->selected == 0) {
-				view_flash(view);
-				break;
-			}
 			if (s->selected > 0) {
 				s->selected--;
 				if (s->selected == 0)