mirror of
https://github.com/neovim/neovim.git
synced 2025-12-04 21:52:41 +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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user