From 006c2811e099992fb8739c1bd51eb173b7852499 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 29 Apr 2025 10:27:43 +0530 Subject: [PATCH] ... --- kitty/simple_cli_definitions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/simple_cli_definitions.py b/kitty/simple_cli_definitions.py index f9347fb8d..126e2fb9c 100644 --- a/kitty/simple_cli_definitions.py +++ b/kitty/simple_cli_definitions.py @@ -281,7 +281,8 @@ def generate_c_for_opt(name: str, defval: Any, opt: OptionDict) -> Iterator[str] yield from add_list_values(*opt['choices']) case _: yield '\tflag.defval.type = CLI_VALUE_STRING;' - yield f'\tflag.defval.strval = {"NULL" if defval is None else c_str(defval)};' + if defval is not None: + yield f'\tflag.defval.strval = {c_str(defval)};' def generate_c_parser_for(funcname: str, spec: str) -> Iterator[str]: