mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 14:34:52 +02:00
change_font_size: allow multiplying/dividing the current font size in addition to incrementing it
Fixes #8616
This commit is contained in:
@@ -4182,6 +4182,11 @@ To setup shortcuts for specific font sizes::
|
||||
To setup shortcuts to change only the current OS window's font size::
|
||||
|
||||
map kitty_mod+f6 change_font_size current 10.0
|
||||
|
||||
To setup shortcuts to multiply/divide the font size:
|
||||
|
||||
map kitty_mod+f6 change_font_size all *2.0
|
||||
map kitty_mod+f6 change_font_size all /2.0
|
||||
''') # }}}
|
||||
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ def parse_change_font_size(func: str, rest: str) -> tuple[str, tuple[bool, str |
|
||||
c_all = vals[0].lower() == 'all'
|
||||
sign: str | None = None
|
||||
amt = vals[1]
|
||||
if amt[0] in '+-':
|
||||
if amt[0] in '+-*/':
|
||||
sign = amt[0]
|
||||
amt = amt[1:]
|
||||
return func, (c_all, sign, float(amt.strip()))
|
||||
|
||||
Reference in New Issue
Block a user