all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
Cc: 45628@debbugs.gnu.org, bandali@gnu.org
Subject: bug#45628: 28.0.50; Scrolling on echo area with pixel-scroll-mode enabled locks up Emacs
Date: Mon, 04 Jan 2021 17:16:35 +0200	[thread overview]
Message-ID: <83turwbulo.fsf@gnu.org> (raw)
In-Reply-To: <245408FF-2A90-4AA2-9301-4E2C7C1C9980@misasa.okayama-u.ac.jp> (message from Tak Kunihiro on Mon, 4 Jan 2021 17:57:48 +0900)

> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> Date: Mon, 4 Jan 2021 17:57:48 +0900
> Cc: 国広卓也 <tkk@misasa.okayama-u.ac.jp>
> 
> I think that following patch would work but usage of `while’
> does not look cool.  If there can is better style, please
> suggest me.

How about a normal while loop with catch before it and throw inside?

> -          (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
> -            (vertical-motion 1))            ; move point downward
> +          (while (and (pixel-point-at-top-p amt) ; prevent too late (multi tries)
> +                      (equal (vertical-motion 1) 1))) ; move point downward
>            (pixel-scroll-pixel-up amt))))))  ; move scope downward
>  
>  (defun pixel-scroll-down (&optional arg)
> @@ -149,8 +149,8 @@ pixel-scroll-down
>                           pixel-resolution-fine-flag
>                         (frame-char-height))
>                     (pixel-line-height -1))))
> -        (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
> -          (vertical-motion -1))              ; move point upward
> +        (while (and (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
> +                    (equal (vertical-motion -1) -1))) ; move point upward

I think equality to 1 or -1 is too stringent.  vertical-motion could
move more if you have overlay strings or display strings at point that
include embedded newlines.  So I think you should test >= 1 and <= -1
respectively.

Also, I believe this problem exists on the emacs-27 branch as well,
right?  Then we should install there first.

Thanks.





  reply	other threads:[~2021-01-04 15:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 16:14 bug#45628: 28.0.50; Scrolling on echo area with pixel-scroll-mode enabled locks up Emacs Amin Bandali
2021-01-03 17:30 ` Eli Zaretskii
2021-01-04  8:57   ` Tak Kunihiro
2021-01-04 15:16     ` Eli Zaretskii [this message]
2021-01-06  0:47       ` Tak Kunihiro
2021-01-09  9:22         ` 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=83turwbulo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=45628@debbugs.gnu.org \
    --cc=bandali@gnu.org \
    --cc=tkk@misasa.okayama-u.ac.jp \
    /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.