about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--xombrero.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/xombrero.c b/xombrero.c
index cb4a4ac..24cfdd6 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -5591,15 +5591,11 @@ handle_keypress(struct tab *t, GdkEventKey *e, int entry)
 				    (e->state & CTRL || e->state & MOD1))
 					return (XT_CB_PASSTHROUGH);
 
-				if ((k->mask == 0 &&
-				    (e->state & (CTRL | MOD1)) == 0) ||
-				    (e->state & k->mask) == k->mask) {
-					if (k->cmd[0] == ':') {
-						args.i = ':';
-						args.s = &k->cmd[1];
-						return command(t, &args);
-					} else
-						return (cmd_execute(t, k->cmd));
+				if (k->mask == 0) {
+					if ((e->state & (CTRL | MOD1)) == 0)
+						goto runcmd;
+				} else if ((e->state & k->mask) == k->mask) {
+					goto runcmd;
 				}
 			}
 
@@ -5607,6 +5603,14 @@ handle_keypress(struct tab *t, GdkEventKey *e, int entry)
 		return buffercmd_addkey(t, e->keyval);
 
 	return (XT_CB_PASSTHROUGH);
+
+runcmd:
+	if (k->cmd[0] == ':') {
+		args.i = ':';
+		args.s = &k->cmd[1];
+		return (command(t, &args));
+	} else
+		return (cmd_execute(t, k->cmd));
 }
 
 int
016-07-04 00:41:29 +0100 Free plugins commands on quit' href='/danisanti/profani-tty/commit/tests/unittests/test_callbacks.c?id=71879a3f64f5f04cdceeedf0317175b2bab1701c'>71879a3f ^
a2726b6a ^
71879a3f ^

81b537b3 ^

d2a08714 ^
71879a3f ^

a2726b6a ^

71879a3f ^

71879a3f ^
a2726b6a ^
3fe1d76a ^


a2726b6a ^
3fe1d76a ^


a2726b6a ^
3fe1d76a ^


a2726b6a ^
3fe1d76a ^




a2726b6a ^
3fe1d76a ^











71879a3f ^
3fe1d76a ^
81b537b3 ^
d2a08714 ^
81b537b3 ^

71879a3f ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66