summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2022-08-21 02:50:08 +0200
committerDave Davenport <qball@blame.services>2022-08-21 02:50:08 +0200
commitbd60a68d1c3f9b57481da6ff4de846513dd5f2f8 (patch)
tree65d15193d7c45f6d706b7015e1a14661d2671679
parent2ea30861d3ab857f831d94cebff037fc95737786 (diff)
[combi] Fix selecting entry with only bang as input.
Check for a space or eos.
-rw-r--r--source/modes/combi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/modes/combi.c b/source/modes/combi.c
index 6293aa62..7297a12e 100644
--- a/source/modes/combi.c
+++ b/source/modes/combi.c
@@ -166,7 +166,8 @@ static ModeMode combi_mode_result(Mode *sw, int mretv, char **input,
}
}
if (switcher >= 0) {
- if (eob[0] == ' ') {
+ if (eob[0] == ' ' || eob[0] == '\0') {
+ printf("found mode\n");
char *n = eob + 1;
return mode_result(pd->switchers[switcher].mode, mretv, &n,
selected_line - pd->starts[switcher]);