about summary refs log tree commit diff stats
path: root/src/command/cmd_ac.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-11-02 18:52:25 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-11-02 18:52:25 +0100
commit3d307fe3418919b42bc00a7e171f0c3050c8d8e6 (patch)
treee838f9b70d66b3f5382e8150bdf60d6b2bba2b4b /src/command/cmd_ac.c
parent90c4667e3b60be0c78ebefc933219167db4a6169 (diff)
downloadprofani-tty-3d307fe3418919b42bc00a7e171f0c3050c8d8e6.tar.gz
Get rid of str_contains()
We can use strchr() here.
Diffstat (limited to 'src/command/cmd_ac.c')
-rw-r--r--src/command/cmd_ac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c
index 52535f23..12b2ae9d 100644
--- a/src/command/cmd_ac.c
+++ b/src/command/cmd_ac.c
@@ -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) {