Get rid of str_contains()

We can use strchr() here.
This commit is contained in:
Michael Vetter
2020-11-02 18:52:25 +01:00
parent 90c4667e3b
commit 3d307fe341
3 changed files with 2 additions and 15 deletions

View File

@@ -1172,14 +1172,14 @@ char*
cmd_ac_complete(ProfWin* window, const char* const input, gboolean previous)
{
// autocomplete command
if ((strncmp(input, "/", 1) == 0) && (!str_contains(input, strlen(input), ' '))) {
if ((strncmp(input, "/", 1) == 0) && (!strchr(input, ' '))) {
char* found = NULL;
found = autocomplete_complete(commands_ac, input, TRUE, previous);
if (found) {
return found;
}
// autocomplete parameters
// autocomplete parameters
} else {
char* found = _cmd_ac_complete_params(window, input, previous);
if (found) {