commit 92eb94c16445553b9ee58b1ad7121389449527fc
parent 24c94990b0061caf97933d0230abaf56d11dd949
Author: Claudio Alessi <smoppy@gmail.com>
Date: Wed, 2 Mar 2016 16:39:54 +0100
Append list for items.
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/core.c b/core.c
@@ -112,7 +112,6 @@ choose(const char *msg, char *opts) {
if(*o)
break;
}
-
stfl_setf("statustext", "");
return *o;
}
@@ -143,8 +142,13 @@ detach(View *v) {
void
attachitemto(Item *i, Item **ii) {
- i->next = *ii;
- *ii = i;
+ Item **l;
+
+ for(l = ii; *l && (*l)->next; l = &(*l)->next);
+ if(!*l)
+ *l = i;
+ else
+ (*l)->next = i;
}
void