fix wrong path in pathbar_activate event (Motif)

2 weeks ago

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 06 Mar 2025 19:01:09 +0100 (2 weeks ago)
changeset 488
e4de8ba906f8
parent 487
077c5029aaee
child 489
073a5e893050

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) {

mercurial