diff options
| author | Connor Lane Smith <cls@lubutu.com> | 2010-08-10 14:14:37 +0100 |
|---|---|---|
| committer | Connor Lane Smith <cls@lubutu.com> | 2010-08-10 14:14:37 +0100 |
| commit | 605e9b6c035979935f658c52938df56e2d0387ef (patch) | |
| tree | aa0b7fefaef8cedeb8740115dc0fbcf612405160 | |
| parent | caf524626894bdee3756c4065bca44152d0efe9a (diff) | |
reverted calcoffsets
| -rw-r--r-- | dmenu.c | 11 |
1 files changed, 6 insertions, 5 deletions
| @@ -82,11 +82,12 @@ calcoffsets(void) { | |||
| 82 | else | 82 | else |
| 83 | n = mw - (promptw + inputw + textw(dc, "<") + textw(dc, ">")); | 83 | n = mw - (promptw + inputw + textw(dc, "<") + textw(dc, ">")); |
| 84 | 84 | ||
| 85 | for(i = 0, next = curr; i <= n && next; next = next->right) | 85 | for(i = 0, next = curr; next; next = next->right) |
| 86 | i += (lines > 0) ? LINEH : MIN(textw(dc, next->text), mw/3); | 86 | if((i += (lines > 0) ? LINEH : MIN(textw(dc, next->text), mw/3)) > n) |
| 87 | 87 | break; | |
| 88 | for(i = 0, prev = curr; i <= n && prev && prev->left; prev = prev->left) | 88 | for(i = 0, prev = curr; prev && prev->left; prev = prev->left) |
| 89 | i += (lines > 0) ? LINEH : MIN(textw(dc, prev->left->text), mw/3); | 89 | if((i += (lines > 0) ? LINEH : MIN(textw(dc, prev->left->text), mw/3)) > n) |
| 90 | break; | ||
| 90 | } | 91 | } |
| 91 | 92 | ||
| 92 | char * | 93 | char * |
