all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
To: eliz@gnu.org
Cc: tkk@misasa.okayama-u.ac.jp, valentjedi@gmail.com, 29737@debbugs.gnu.org
Subject: bug#29737: 27.0.50; pixel-scroll-mode is laggy
Date: Sun, 17 Dec 2017 11:00:45 +0900 (JST)	[thread overview]
Message-ID: <20171217.110045.719415281082937882.tkk@misasa.okayama-u.ac.jp> (raw)
In-Reply-To: <83shcaqxgm.fsf@gnu.org>

[-- Attachment #1: Type: Text/Plain, Size: 1077 bytes --]

> While I see that scrolling became pixel-wise indeed, it is also very
> laggy. CPU blows up to 100% and ui hangs and freezes. It works ok if
> I scroll slowly though. It happens with all my plugins and
> customizations and if I run emacs with -Q flag. My OS is Arch Linux
> and I also have HiDPI screen (it's MacBook 11,4, mid-2015).

On the previous commit <8eb6870be690128fb1cbc012c55093813c39830c>, I
revised two functions.  I fixed `pixel-scroll-down' but I broke
`pixel-scroll-up'.  I apologize for the careless commit.

With the current and broken `pixel-scroll-up', when EOB is shown on
top of the screen, emacs hangs (or goes in infinite while loop).  The
pixel-scroll-up should be reverted to commit
<1bda71ec3b11eeb4d06c3da094a3cb21bac18d5c>.

I'm sending ChangeLog and a patch relative to the current master.

* ChangeLog

Fix vertical cursor motion in pixel-scroll.el

* lisp/pixel-scroll.el (pixel-scroll-up): Do not try to move cursor down when EOB
is shown at the top.  This function is reverted to commit
1bda71ec3b11eeb4d06c3da094a3cb21bac18d5c. (bug#29737)


[-- Attachment #2: pixel-scroll.el.diff --]
[-- Type: Text/X-Patch, Size: 1141 bytes --]

diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index f64a439..7024487
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -110,11 +110,11 @@ This is an alternative of `scroll-up'.  Scope moves downward."
                        pixel-resolution-fine-flag
                      (frame-char-height))
                  (pixel-line-height))))
-      (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
-        (vertical-motion 1))            ; move point downward
-      (if (pixel-eob-at-top-p)          ; when end-of-the-buffer is close
-          (scroll-up 1)                 ; relay on robust method
-        (pixel-scroll-pixel-up amt))))) ; move scope downward
+      (if (pixel-eob-at-top-p)            ; when end-of-the-buffer is close
+          (scroll-up 1)                   ; relay on robust method
+        (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
+          (vertical-motion 1))            ; move point downward
+        (pixel-scroll-pixel-up amt)))))   ; move scope downward
 
 (defun pixel-scroll-down (&optional arg)
   "Scroll text of selected window down ARG lines.

  parent reply	other threads:[~2017-12-17  2:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-16 17:55 bug#29737: 27.0.50; pixel-scroll-mode is laggy Valentin Ignatyev
2017-12-16 18:30 ` Eli Zaretskii
     [not found]   ` <CAO90aWvmqMg=wkt4YyqE8kDP_BNZjAih7AEdyP-Zt74OydpUHA@mail.gmail.com>
2017-12-16 19:33     ` Eli Zaretskii
2017-12-16 19:35       ` Valentin Ignatyev
2017-12-17  2:00       ` Tak Kunihiro [this message]
2017-12-22 10:22         ` Eli Zaretskii
2017-12-23  3:18           ` Tak Kunihiro
2017-12-23  9:20             ` Eli Zaretskii
2017-12-23 11:30               ` Valentin Ignatyev
2017-12-23 11:53                 ` Valentin Ignatyev
2017-12-24  2:28                   ` Tak Kunihiro
2017-12-24  5:18                     ` Valentin Ignatyev
2017-12-25  3:48                       ` Tak Kunihiro
2018-01-01  0:58                         ` Tak Kunihiro
2018-01-06 17:43                           ` Eli Zaretskii
2018-01-07  2:06                             ` Tak Kunihiro
2018-01-07  7:19                               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171217.110045.719415281082937882.tkk@misasa.okayama-u.ac.jp \
    --to=tkk@misasa.okayama-u.ac.jp \
    --cc=29737@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=valentjedi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.