1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 07:02:30 +01:00

Add a trailing "/" to dirs in dialog autocomplete

The autocomplete feature in the "Run" dialog now adds a trailing "/"
when autocompleting directory names. This does three things:

1) shows you that you are completing a directory and not a filename,
2) saves one character of typing, and
3) makes it behave more consistent with shell (bash) autocompletion
This commit is contained in:
Johann Haarhoff
2010-03-09 00:47:15 +02:00
committed by Carlos R. Mafra
parent 1f3adb0ea5
commit 6b791d8a89

View File

@@ -263,6 +263,8 @@ ScanFiles(const char *dir, const char *prefix, unsigned acceptmask, unsigned dec
WMFindInArray(result, (WMMatchDataProc *) strmatch,
de->d_name + prefixlen) == WANotFound) {
suffix = wstrdup(de->d_name + prefixlen);
if (sb.st_mode & S_IFDIR)
wstrappend(suffix,"/");
WMAddToArray(result, suffix);
}
wfree(fullfilename);