Fix a regression in 0.27.0 that broke kitty @ set-font-size 0

Fixes #5992
This commit is contained in:
Kovid Goyal 2023-02-08 14:21:00 +05:30
parent 4dfd4d4972
commit 237a5d17c0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -40,6 +40,8 @@ Detailed list of changes
- Text rendering: Use sRGB correct linear gamma blending for nicer font rendering and better color accuracy with transparent windows. See the option :opt:`text_composition_strategy` for details. (:pull:`5969`)
- Fix a regression in 0.27.0 that broke kitty @ set-font-size 0 (:iss:`5992`)
0.27.1 [2023-02-07]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -11,7 +11,7 @@ if TYPE_CHECKING:
class SetFontSize(RemoteCommand):
protocol_spec = __doc__ = '''
size+/float: The new font size in pts (a positive number)
size+/float: The new font size in pts (a positive number). If absent is assumed to be zero which means reset to default.
all/bool: Boolean whether to change font size in the current window or all windows
increment_op/choices.+.-: The string ``+`` or ``-`` to interpret size as an increment
'''
@ -45,7 +45,7 @@ the font size for any newly created OS Windows in the future.
def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get: PayloadGetType) -> ResponseType:
boss.change_font_size(
payload_get('all'),
payload_get('increment_op'), payload_get('size'))
payload_get('increment_op'), payload_get('size') or 0)
return None