We allow to put whitespace or additional ':' before ex commands to avoid
recoding of the commands in the history. But in the completion only the
first ':' was skipped to get the command to apply completion for.
So ': open foo<Tab>' did not start completion, because ' open' is none
known command.
So skip all ':' and whitespace after the first ':' to set the pointer to
the beginning of the command.
in = (const char*)input;
if (*in == ':') {
const char *before_cmdname;
- /* skipt the first : */
- in++;
+ /* skip leading ':' and whitespace */
+ while (*in && (*in == ':' || VB_IS_SPACE(*in))) {
+ in++;
+ }
ExArg *arg = g_slice_new0(ExArg);
- skip_whitespace(&in);
parse_count(&in, arg);
/* Backup the current pointer so that we can restore the input pointer