Test and fix issue where, if binding X is a prefix of binding Y, and X

is specified before Y, then Y will never be invoked because X will
always get there first. Now instead we order bindings in descending
order by length, so that we always test the binding before any others that
prefixes it. Fixes #1283.
This commit is contained in:
ridiculousfish
2014-02-12 12:49:32 -08:00
parent 29ddb68da4
commit 503bbd85b5
4 changed files with 76 additions and 42 deletions

View File

@@ -556,8 +556,7 @@ static int builtin_bind(parser_t &parser, wchar_t **argv)
BIND_ERASE,
BIND_KEY_NAMES,
BIND_FUNCTION_NAMES
}
;
};
int argc=builtin_count_args(argv);
int mode = BIND_INSERT;