mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
multiselect + printindex compatibility ref. #10
This commit is contained in:
parent
b210a99e31
commit
67180f6288
@ -11,20 +11,24 @@ static void
|
||||
printsel(unsigned int state)
|
||||
{
|
||||
for (int i = 0;i < selidsize;i++)
|
||||
if (selid[i] != -1 && (!sel || sel->id != selid[i]))
|
||||
if (selid[i] != -1 && (!sel || sel->id != selid[i])) {
|
||||
#if PRINTINDEX_PATCH
|
||||
printf("%d\n", selid[i]);
|
||||
#else
|
||||
puts(items[selid[i]].text);
|
||||
if (print_index)
|
||||
printf("%d\n", selid[i]);
|
||||
else
|
||||
#endif // PRINTINDEX_PATCH
|
||||
if (sel && !(state & ShiftMask))
|
||||
puts(items[selid[i]].text);
|
||||
}
|
||||
if (sel && !(state & ShiftMask)) {
|
||||
#if PRINTINDEX_PATCH
|
||||
printf("%d\n", sel->index);
|
||||
#else
|
||||
puts(sel->text);
|
||||
if (print_index)
|
||||
printf("%d\n", sel->index);
|
||||
else
|
||||
#endif // PRINTINDEX_PATCH
|
||||
else
|
||||
puts(sel->text);
|
||||
} else
|
||||
puts(text);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user