From: Po Lu Date: Thu, 30 May 2024 13:31:18 +0000 (+0800) Subject: Don't set text scale to fractional values in touch-screen-pinch X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=862d943b125a8110d0d1c1d479a877989f8007af;p=emacs.git 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) --- 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