[combi] Fix selecting entry with only bang as input.

Check for a space or eos.
This commit is contained in:
Dave Davenport 2022-08-21 02:50:08 +02:00
parent 2ea30861d3
commit bd60a68d1c
1 changed files with 2 additions and 1 deletions

View File

@ -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]);