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)
|
printsel(unsigned int state)
|
||||||
{
|
{
|
||||||
for (int i = 0;i < selidsize;i++)
|
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
|
#if PRINTINDEX_PATCH
|
||||||
printf("%d\n", selid[i]);
|
if (print_index)
|
||||||
#else
|
printf("%d\n", selid[i]);
|
||||||
puts(items[selid[i]].text);
|
else
|
||||||
#endif // PRINTINDEX_PATCH
|
#endif // PRINTINDEX_PATCH
|
||||||
if (sel && !(state & ShiftMask))
|
puts(items[selid[i]].text);
|
||||||
|
}
|
||||||
|
if (sel && !(state & ShiftMask)) {
|
||||||
#if PRINTINDEX_PATCH
|
#if PRINTINDEX_PATCH
|
||||||
printf("%d\n", sel->index);
|
if (print_index)
|
||||||
#else
|
printf("%d\n", sel->index);
|
||||||
puts(sel->text);
|
else
|
||||||
#endif // PRINTINDEX_PATCH
|
#endif // PRINTINDEX_PATCH
|
||||||
else
|
puts(sel->text);
|
||||||
|
} else
|
||||||
puts(text);
|
puts(text);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user