mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-29 11:18:50 +02:00
Fix default generation for nullable colors
This commit is contained in:
@@ -577,7 +577,7 @@ def gen_go_code(defn: Definition) -> str:
|
||||
elif isinstance(d, Color):
|
||||
dval = f'style.RGBA{{Red:{d.red}, Green: {d.green}, Blue: {d.blue}}}'
|
||||
if 'NullableColor' in go_types[name]:
|
||||
dval = f'style.NullableColor{{Color:{dval}}}'
|
||||
dval = f'style.NullableColor{{IsSet: true, Color:{dval}}}'
|
||||
else:
|
||||
dval = repr(d)
|
||||
a(f'{name}: {dval},')
|
||||
|
||||
Reference in New Issue
Block a user