mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +00:00
startup: fix ":if 0|syntax on|endif" bug (#8731)
Problem: ":if 0|syntax {on,off}|endif" skips the default of "syntax on" because the executor was setting the `did_syntax_onoff` flag even though "syntax {on,off}" is not actually executed. closes #8728
This commit is contained in:
@@ -3425,9 +3425,9 @@ static void syn_cmd_off(exarg_T *eap, int syncing)
|
||||
static void syn_cmd_onoff(exarg_T *eap, char *name)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
did_syntax_onoff = true;
|
||||
eap->nextcmd = check_nextcmd(eap->arg);
|
||||
if (!eap->skip) {
|
||||
did_syntax_onoff = true;
|
||||
char buf[100];
|
||||
memcpy(buf, "so ", 4);
|
||||
vim_snprintf(buf + 3, sizeof(buf) - 3, SYNTAX_FNAME, name);
|
||||
|
Reference in New Issue
Block a user