mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Factor out skip_colon_white()
This commit is contained in:
parent
d4384cbbf3
commit
3b3d217754
@ -1201,6 +1201,19 @@ static void get_wincmd_addr_type(char_u *arg, exarg_T *eap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char_u *skip_colon_white(const char_u *p, bool skipleadingwhite)
|
||||||
|
{
|
||||||
|
if (skipleadingwhite) {
|
||||||
|
p = skipwhite(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (*p == ':') {
|
||||||
|
p = skipwhite(p + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (char_u *)p;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Execute one Ex command.
|
* Execute one Ex command.
|
||||||
*
|
*
|
||||||
@ -1705,9 +1718,7 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
/*
|
/*
|
||||||
* Skip ':' and any white space
|
* Skip ':' and any white space
|
||||||
*/
|
*/
|
||||||
ea.cmd = skipwhite(ea.cmd);
|
ea.cmd = skip_colon_white(ea.cmd, true);
|
||||||
while (*ea.cmd == ':')
|
|
||||||
ea.cmd = skipwhite(ea.cmd + 1);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we got a line, but no command, then go to the line.
|
* If we got a line, but no command, then go to the line.
|
||||||
@ -3580,9 +3591,8 @@ char_u *skip_range(
|
|||||||
++cmd;
|
++cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip ":" and white space. */
|
// Skip ":" and white space.
|
||||||
while (*cmd == ':')
|
cmd = skip_colon_white(cmd, false);
|
||||||
cmd = skipwhite(cmd + 1);
|
|
||||||
|
|
||||||
return (char_u *)cmd;
|
return (char_u *)cmd;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user