dmenu

Kris's build of dmenu
git clone git clone https://git.krisyotam.com/krisyotam/dmenu.git
Log | Files | Refs | README | LICENSE

fzfexpect.c (669B)


      1 static char *expected;
      2 #if MULTI_SELECTION_PATCH
      3 void
      4 expect(char *expect, XKeyEvent *ev)
      5 {
      6 	if (sel && expected && strstr(expected, expect)) {
      7 		if (expected && sel && !(ev->state & ShiftMask))
      8 			puts(expect);
      9 		printselected(ev->state);
     10 		cleanup();
     11 		exit(1);
     12 	} else if (!sel && expected && strstr(expected, expect)) {
     13 		puts(expect);
     14 		cleanup();
     15 		exit(1);
     16 	}
     17 }
     18 #else
     19 void
     20 expect(char *expect, XKeyEvent *ignored)
     21 {
     22 	if (sel && expected && strstr(expected, expect)) {
     23 		puts(expect);
     24 		printitem(sel);
     25 		cleanup();
     26 		exit(1);
     27 	} else if (!sel && expected && strstr(expected, expect)){
     28 		puts(expect);
     29 		cleanup();
     30 		exit(1);
     31 	}
     32 }
     33 #endif // MULTI_SELECTION_PATCH