Commit 925e6f230ee6e0403012bf610faf83e908b7b087

Stefan Sperling 2018-05-20T12:40:31

allow scrolling tog diff view with enter/backspace

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/tog/tog.c b/tog/tog.c
index 54fc8c0..e250234 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -876,11 +876,14 @@ show_diff_view(struct got_object *obj1, struct got_object *obj2,
 				break;
 			case 'k':
 			case KEY_UP:
+			case KEY_BACKSPACE:
 				if (first_displayed_line > 1)
 					first_displayed_line--;
 				break;
 			case 'j':
 			case KEY_DOWN:
+			case KEY_ENTER:
+			case '\r':
 				if (!eof)
 					first_displayed_line++;
 				break;