mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
fix(migrate): avoid ternary 'falls through' state (#242)
See: https://riptutorial.com/lua/example/26503/emulating-ternary-operator-with--and---or--logical-operators-#undefined
This commit is contained in:
parent
e28cda232b
commit
12ace889a0
1 changed files with 2 additions and 2 deletions
|
|
@ -133,11 +133,11 @@ local function migrate(options)
|
|||
|
||||
-- These never actually existed, but may be set intuitively by the user
|
||||
-- because of `disable_italics` existing.
|
||||
options.styles.bold = (options.disable_bold or options.disable_bolds) and false or options.styles.bold
|
||||
options.styles.bold = not (options.disable_bold or options.disable_bolds) and options.styles.bold or false
|
||||
|
||||
-- Similar to bold options, `disable_italic` never existed but could be a
|
||||
-- common typo of the actual `disable_italics`.
|
||||
options.styles.italic = (options.disable_italic or options.disable_italics) and false or options.styles.italic
|
||||
options.styles.italic = not (options.disable_italic or options.disable_italics) and options.styles.italic or false
|
||||
|
||||
-- Set h1 through h6 to the same color if only one is specified
|
||||
if type(options.groups.headings) == "string" then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue