# HG changeset patch # User zas_ # Date 1236027878 0 # Node ID 0011d6859ec508cda7e3d69ed2334730aa91bcc2 # Parent dc1768a8af0153f089d2d43c8a0de686927864a7 Add a directory separator at the end of names in tab completion list to indicate directories. diff -r dc1768a8af01 -r 0011d6859ec5 src/ui_tabcomp.c --- a/src/ui_tabcomp.c Sun Mar 01 23:38:36 2009 +0000 +++ b/src/ui_tabcomp.c Mon Mar 02 21:04:38 2009 +0000 @@ -124,7 +124,18 @@ gchar *name = dir->d_name; if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0) { - list = g_list_prepend(list, path_to_utf8(name)); + gchar *abspath = g_build_filename(path, name, NULL); + + if (isdir(abspath)) + { + gchar *dname = g_strconcat(name, G_DIR_SEPARATOR_S, NULL); + list = g_list_prepend(list, path_to_utf8(dname)); + } + else + { + list = g_list_prepend(list, path_to_utf8(name)); + } + g_free(abspath); } } closedir(dp);