omit empty aliases from command completion

Some operations, like pop or looplist, leave empty aliases behind. Mostly,
this is without consequence - but before this commit, they showed up
during command completion.
This commit is contained in:
ac-stef
2015-03-06 14:37:42 +01:00
parent 045343a26d
commit 1c402a7d93
+1 -1
View File
@@ -934,7 +934,7 @@ void commandcomplete(char *s, bool reversedirection)
{ // commandname completion
vector<const char *> matchingidents;
enumerate(*idents, ident, id,
if(!strncasecmp(id.name, cp, completesize)) matchingidents.add(id.name); // find all matching possibilities to get the list length (and give an opportunity to sort the list first)
if(!strncasecmp(id.name, cp, completesize) && (id.type != ID_ALIAS || *id.action)) matchingidents.add(id.name); // find all matching possibilities to get the list length (and give an opportunity to sort the list first)
);
if(matchingidents.length())
{