change_font_size: allow multiplying/dividing the current font size in addition to incrementing it

Fixes #8616
This commit is contained in:
Kovid Goyal
2025-05-09 07:39:06 +05:30
parent e0e4e53e3b
commit 6a53897c17
6 changed files with 23 additions and 5 deletions

View File

@@ -3,11 +3,12 @@
package at
import (
"bytes"
"strconv"
)
func parse_set_font_size(arg string, payload *set_font_size_json_type) error {
if len(arg) > 0 && (arg[0] == '+' || arg[0] == '-') {
if len(arg) > 0 && (bytes.IndexByte([]byte{'+', '-', '/', '*'}, arg[0]) > -1) {
payload.Increment_op = arg[:1]
arg = arg[1:]
}