From 862d943b125a8110d0d1c1d479a877989f8007af Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 30 May 2024 21:31:18 +0800 Subject: [PATCH] Don't set text scale to fractional values in touch-screen-pinch * lisp/touch-screen.el (touch-screen-pinch): Take floor of computed scale. (cherry picked from commit 1ebb9cb93b2fefa84f18a63fb24c1ed4fcf095a7) --- lisp/touch-screen.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el index ca02ca3caf6..436b8d0954c 100644 --- a/lisp/touch-screen.el +++ b/lisp/touch-screen.el @@ -937,8 +937,8 @@ text scale by the ratio therein." (aset touch-screen-aux-tool 7 current-scale))) ;; Set the text scale. - (text-scale-set (+ start-scale - (round (log scale text-scale-mode-step)))) + (text-scale-set (floor (+ (round (log scale text-scale-mode-step)) + start-scale))) ;; Subsequently move the row which was at the centrum to its Y ;; position. (if (and (not (eq current-scale -- 2.39.2