fix(options): disallow empty 'fdc' and 'scl' (#16765)

Empty string values for these options aren't actually allowed, but
check_opt_strings allows empty string options.

It so happens that 'scl' handles empty string like "auto", but empty 'fdc'
causes glitchiness (win_fdccol_count returns an incorrect value).

Just disallow empty string values for these options completely.
This commit is contained in:
Sean Dewar
2021-12-25 05:30:34 +00:00
committed by GitHub
parent 0d7a97224f
commit 70a68dc2c5
2 changed files with 9 additions and 1 deletions

View File

@@ -83,4 +83,9 @@ describe('set', function()
Press ENTER or type command to continue^ |
]])
end)
it('foldcolumn and signcolumn to empty string is disallowed', function()
matches('E474: Invalid argument: fdc=', exc_exec('set fdc='))
matches('E474: Invalid argument: scl=', exc_exec('set scl='))
end)
end)