Re: [PATCH v43 0/1] MR7843: cmd: Implement tab completion for command line entry.
eric pouech (@epo) commented about programs/cmd/wcmdmain.c:
+ +static void build_search_string(WCHAR *inputBuffer, int len, SEARCH_CONTEXT *sc) +{ + int cc = 0, nn = 0; + WCHAR *param = NULL, *last_param, *stripped_copy = NULL; + WCHAR last_stripped_copy[MAX_PATH] = L"\0"; + BOOL need_wildcard = TRUE; + + sc->searchstr[0] = L'\0'; + + /* If inputBuffer ends in a space then the user hit tab beyond the last + * parameter, so use that as the search pos (i.e. a wildcard search). + * Otherwise, parse the buffer to find the last parameter in the buffer, + * where tab was pressed. + */ + if (inputBuffer[len-1] == L' ') { len can be zero here (if \<tab\> is pressed at beg of line)
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_103749
participants (1)
-
eric pouech (@epo)