reverted calcoffsets
This commit is contained in:
parent
caf5246268
commit
605e9b6c03
11
dmenu.c
11
dmenu.c
|
@ -82,11 +82,12 @@ calcoffsets(void) {
|
||||||
else
|
else
|
||||||
n = mw - (promptw + inputw + textw(dc, "<") + textw(dc, ">"));
|
n = mw - (promptw + inputw + textw(dc, "<") + textw(dc, ">"));
|
||||||
|
|
||||||
for(i = 0, next = curr; i <= n && next; next = next->right)
|
for(i = 0, next = curr; next; next = next->right)
|
||||||
i += (lines > 0) ? LINEH : MIN(textw(dc, next->text), mw/3);
|
if((i += (lines > 0) ? LINEH : MIN(textw(dc, next->text), mw/3)) > n)
|
||||||
|
break;
|
||||||
for(i = 0, prev = curr; i <= n && prev && prev->left; prev = prev->left)
|
for(i = 0, prev = curr; prev && prev->left; prev = prev->left)
|
||||||
i += (lines > 0) ? LINEH : MIN(textw(dc, prev->left->text), mw/3);
|
if((i += (lines > 0) ? LINEH : MIN(textw(dc, prev->left->text), mw/3)) > n)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
Loading…
Reference in New Issue