Commit 751490770ba7a1fe3669a4a604d7412ba8cba776

Stefan Sperling 2021-08-30T19:07:58

make tog ignore Ctrl+L and B while loading all commits Otherwise tog gets into a funky non-recoverable state if these keys are pressed instead of Backspace while commits are loading. bug found by + ok tracey

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/tog/tog.c b/tog/tog.c
index c8ded57..06ff7cd 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2542,8 +2542,9 @@ input_log_view(struct tog_view **new_view, struct tog_view *view, int ch)
 	case KEY_BACKSPACE:
 	case CTRL('l'):
 	case 'B':
-		if (ch == KEY_BACKSPACE && s->thread_args.load_all) {
-			s->thread_args.load_all = 0;
+		if (s->thread_args.load_all) {
+			if (ch == KEY_BACKSPACE)
+				s->thread_args.load_all = 0;
 			break;
 		}
 		if (ch == KEY_BACKSPACE &&