diff -r 9a7e4a335b2b -r 2019fdbaadfd ui/common/context.c --- a/ui/common/context.c Sun Feb 15 15:44:24 2015 +0100 +++ b/ui/common/context.c Tue Feb 17 20:12:22 2015 +0100 @@ -174,7 +174,7 @@ return var; } } else { - // create an empty value and add it first to the window variables + // create an empty value and add it to the window variables // it can be moved to the document vars later void *value = uic_create_value(ctx->mempool->allocator, type); if(!value) { @@ -217,11 +217,14 @@ UiText *f = from->value; UiText *t = to->value; char *tvalue = t->value; + int tpos = t->pos; memcpy(t, f, sizeof(UiText)); if(set && tvalue) { t->set(t, tvalue); + t->setposition(t, tpos); } else { f->value = f->get(f); + f->pos = f->position(f); } break; }