dotfiles/.config/suckless/dmenu/patch/fzfexpect.c

16 lines
286 B
C
Raw Normal View History

2024-04-23 04:34:15 +02:00
static char *expected;
void
expect(char *expect, XKeyEvent *ignored)
{
if (sel && expected && strstr(expected, expect)) {
puts(expect);
puts(sel->text);
cleanup();
exit(1);
} else if (!sel && expected && strstr(expected, expect)){
puts(expect);
cleanup();
exit(1);
}
}