aboutsummaryrefslogtreecommitdiff
path: root/test/functional/options/defaults_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-07-18 14:30:11 +0200
committerGitHub <noreply@github.com>2018-07-18 14:30:11 +0200
commit489d32f2b88f8d0796b10e59a4d8b64e4a49b15b (patch)
treee036eeb6dc98eae02df4ad4abd330a9eb0a20fe5 /test/functional/options/defaults_spec.lua
parentcd94dd6bb29f3140cb25b30e98fba9123bfd408f (diff)
downloadrneovim-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 'test/functional/options/defaults_spec.lua')
-rw-r--r--test/functional/options/defaults_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/options/defaults_spec.lua b/test/functional/options/defaults_spec.lua
index 787ec366b8..f6f3f02f45 100644
--- a/test/functional/options/defaults_spec.lua
+++ b/test/functional/options/defaults_spec.lua
@@ -118,6 +118,13 @@ describe('startup defaults', function()
clear('-u', 'NORC', '-c', 'syntax off')
eq(0, eval('exists("g:syntax_on")'))
end)
+
+ it('":if 0|syntax on|endif" does not affect default #8728', function()
+ clear('-u', 'NORC', '--cmd', ':if 0|syntax on|endif')
+ eq(1, eval('exists("g:syntax_on")'))
+ clear('-u', 'NORC', '--cmd', ':if 0|syntax off|endif')
+ eq(1, eval('exists("g:syntax_on")'))
+ end)
end)
describe("'fillchars'", function()