diff -r 794a5c91c479 -r c96169444d88 ui/motif/text.c --- a/ui/motif/text.c Sun Apr 06 13:21:37 2014 +0200 +++ b/ui/motif/text.c Thu Apr 10 11:37:41 2014 +0200 @@ -65,6 +65,7 @@ value->insert = ui_textarea_insert; value->position = ui_textarea_position; value->selection = ui_textarea_selection; + value->length = ui_textarea_length; value->value = NULL; value->obj = text_area; @@ -129,6 +130,10 @@ XmTextGetSelectionPosition(text->obj, (long*)begin, (long*)end); } +int ui_textarea_length(UiText *text) { + return (int)XmTextGetLastPosition(text->obj); +} + UiUndoMgr* ui_create_undomgr() { UiUndoMgr *mgr = malloc(sizeof(UiUndoMgr)); mgr->begin = NULL;