]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix tab completion spam
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Jan 2008 09:47:10 +0000 (09:47 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Jan 2008 09:47:10 +0000 (09:47 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8009 d7cf8633-e32d-0410-b094-e92efae38249

console.c

index a70c05e24019f00e202eaa8c2a0be06795fb7277..8b401a7bec4dade79880f5f34436431f293de253 100644 (file)
--- a/console.c
+++ b/console.c
@@ -2308,7 +2308,7 @@ void Con_CompleteCommandLine (void)
                                        if(slash)
                                        {
                                                strlcpy(t, s, min(sizeof(t), (unsigned int)(slash - s + 2))); // + 2, because I want to include the slash
-                                               strlcat(t, "/*", sizeof(t));
+                                               strlcat(t, "*", sizeof(t));
                                                search = FS_Search(t, true, true);
                                        }
                                        else
@@ -2384,6 +2384,8 @@ void Con_CompleteCommandLine (void)
                                }
                                stringlistfreecontents(&resultbuf);
                                stringlistfreecontents(&dirbuf);
+
+                               return; // bail out, when we complete for a command that wants a file name
                        }
                }
        }