]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't set text scale to fractional values in touch-screen-pinch
authorPo Lu <luangruo@yahoo.com>
Thu, 30 May 2024 13:31:18 +0000 (21:31 +0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 May 2024 14:36:32 +0000 (16:36 +0200)
* lisp/touch-screen.el (touch-screen-pinch): Take floor of
computed scale.

(cherry picked from commit 1ebb9cb93b2fefa84f18a63fb24c1ed4fcf095a7)

lisp/touch-screen.el

index ca02ca3caf61d90d9c1b11d9fe7018c0ba53413c..436b8d0954c8448240fdc4c58732e96d030cb754 100644 (file)
@@ -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