diff --git a/patch/multiselect.c b/patch/multiselect.c index 94825b5..ad78db3 100644 --- a/patch/multiselect.c +++ b/patch/multiselect.c @@ -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