GNU bug report logs -
#29374
patch for lisp/pixel-scroll
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29374 in the body.
You can then email your comments to 29374 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29374
; Package
emacs
.
(Tue, 21 Nov 2017 04:36:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 21 Nov 2017 04:36:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm sending a patch for lisp/pixel-scroll.el.
This patch fixes movement of cursor to stay away from the top of the
line and the end of the line on a screen.
ChangeLog entry and a patch are attached.
* ChangeLog
2017-11-21 Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
Fix cursor movement to stay away from the top of line and the end of line on a screen
* lisp/pixel-scroll.el (pixel-scroll-up): Move cursor down regardless eob is shown on the top.
(pixel-scroll-down) Move cursor up regardless bob is shown on the top.
* Patch
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
old mode 100644
new mode 100755
index 2213a02..556613d
--- 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))))
- (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
+ (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
(defun pixel-scroll-down (&optional arg)
"Scroll text of selected window down ARG lines.
@@ -127,11 +127,11 @@ This is and alternative of `scroll-down'. Scope moves upward."
pixel-resolution-fine-flag
(frame-char-height))
(pixel-line-height -1))))
- (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen
- (pixel-eob-at-top-p)) ; for file with a long line
- (scroll-down 1) ; relay on robust method
- (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
- (vertical-motion -1))
+ (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
+ (vertical-motion -1)) ; move point upward
+ (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen
+ (pixel-eob-at-top-p)) ; for file with a long line
+ (scroll-down 1) ; relay on robust method
(pixel-scroll-pixel-down amt)))))
(defun pixel-bob-at-top-p (amt)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29374
; Package
emacs
.
(Tue, 21 Nov 2017 15:42:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 29374 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 21 Nov 2017 13:35:07 +0900 (JST)
> From: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
> Cc: tkk <at> misasa.okayama-u.ac.jp
>
> I'm sending a patch for lisp/pixel-scroll.el.
>
> This patch fixes movement of cursor to stay away from the top of the
> line and the end of the line on a screen.
Thanks, but please tell more about the problem, and perhaps show a
recipe to reproduce it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29374
; Package
emacs
.
(Tue, 21 Nov 2017 23:09:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 29374 <at> debbugs.gnu.org (full text, mbox):
>> Date: Tue, 21 Nov 2017 13:35:07 +0900 (JST)
>> From: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
>> Cc: tkk <at> misasa.okayama-u.ac.jp
>>
>> I'm sending a patch for lisp/pixel-scroll.el.
>>
>> This patch fixes movement of cursor to stay away from the top of the
>> line and the end of the line on a screen.
>
> Thanks, but please tell more about the problem, and perhaps show a
> recipe to reproduce it.
First of all, expression of my previous message was not correct.
Let me rephrase as below.
This patch fixes movement of cursor to stay away from the top and
the bottom of a screen.
Before fix, sudden scope-jump happened on certain cases. Let's
consider a case with cursor is located at the bottom and about to
scroll down (move scope up).
There is a condition where
bob is shown on the top of screen
and window-vscroll is non-zero.
On this condition, (scroll-up 1) would be called without
(vertical-motion -1). As a consequence screen jumps.
After the fix, cursor will be moved by vertical-motion before calling
scroll-down or pixel-scroll-pixel-down.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 01 Dec 2017 08:59:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
:
bug acknowledged by developer.
(Fri, 01 Dec 2017 08:59:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 29374-done <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 22 Nov 2017 08:08:17 +0900 (JST)
> Cc: 29374 <at> debbugs.gnu.org, tkk <at> misasa.okayama-u.ac.jp
> From: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
>
> >> Date: Tue, 21 Nov 2017 13:35:07 +0900 (JST)
> >> From: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
> >> Cc: tkk <at> misasa.okayama-u.ac.jp
> >>
> >> I'm sending a patch for lisp/pixel-scroll.el.
> >>
> >> This patch fixes movement of cursor to stay away from the top of the
> >> line and the end of the line on a screen.
> >
> > Thanks, but please tell more about the problem, and perhaps show a
> > recipe to reproduce it.
>
> First of all, expression of my previous message was not correct.
> Let me rephrase as below.
>
> This patch fixes movement of cursor to stay away from the top and
> the bottom of a screen.
>
> Before fix, sudden scope-jump happened on certain cases. Let's
> consider a case with cursor is located at the bottom and about to
> scroll down (move scope up).
>
> There is a condition where
> bob is shown on the top of screen
> and window-vscroll is non-zero.
>
> On this condition, (scroll-up 1) would be called without
> (vertical-motion -1). As a consequence screen jumps.
>
> After the fix, cursor will be moved by vertical-motion before calling
> scroll-down or pixel-scroll-pixel-down.
Thanks, I pushed your changes.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 29 Dec 2017 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 170 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.