mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
syntax: avoid extra global macro
This commit is contained in:
@@ -3286,17 +3286,23 @@ static void syn_cmd_off(exarg_T *eap, int syncing)
|
||||
}
|
||||
|
||||
static void syn_cmd_onoff(exarg_T *eap, char *name)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
char buf[100];
|
||||
|
||||
eap->nextcmd = check_nextcmd(eap->arg);
|
||||
if (!eap->skip) {
|
||||
strcpy(buf, "so ");
|
||||
vim_snprintf(buf + 3, sizeof(buf) - 3, SYNTAX_FNAME, name);
|
||||
do_cmdline_cmd(buf);
|
||||
syn_cmd(name);
|
||||
}
|
||||
}
|
||||
|
||||
void syn_cmd(char *name)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
char buf[100];
|
||||
strncpy(buf, "so ", 3);
|
||||
vim_snprintf(buf + 3, sizeof(buf) - 3, SYNTAX_FNAME, name);
|
||||
do_cmdline_cmd(buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle ":syntax [list]" command: list current syntax words.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user