diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-07-18 14:30:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-18 14:30:11 +0200 |
commit | 489d32f2b88f8d0796b10e59a4d8b64e4a49b15b (patch) | |
tree | e036eeb6dc98eae02df4ad4abd330a9eb0a20fe5 /src/nvim/syntax.c | |
parent | cd94dd6bb29f3140cb25b30e98fba9123bfd408f (diff) | |
download | rneovim-489d32f2b88f8d0796b10e59a4d8b64e4a49b15b.tar.gz rneovim-489d32f2b88f8d0796b10e59a4d8b64e4a49b15b.tar.bz2 rneovim-489d32f2b88f8d0796b10e59a4d8b64e4a49b15b.zip |
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
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 98e457db18..87b2fe24a4 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -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); |