2 weeks ago
fix wrong path in pathbar_activate event (Motif)
ui/motif/text.c | file | annotate | diff | comparison | revisions |
--- a/ui/motif/text.c Wed Mar 05 22:28:01 2025 +0100 +++ b/ui/motif/text.c Thu Mar 06 19:01:09 2025 +0100 @@ -793,11 +793,12 @@ } UiPathElm elm = bar->current_pathelms[i]; - cxmutstr name = cx_strdup(cx_strn(elm.name, elm.name_len)); + cxmutstr path = cx_strdup(cx_strn(elm.path, elm.path_len)); if(bar->updateDir) { - bar->updateDir(bar->updateDirData, name.ptr, i); + XNETextSetString(bar->textfield, path.ptr); + bar->updateDir(bar->updateDirData, path.ptr, i); } - free(name.ptr); + free(path.ptr); } static void ui_pathelm_destroy(UiPathElm *elms, size_t nelm) {