Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior of evil-scroll-up and evil-scroll-down #1154

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@bet4it
Copy link

commented May 21, 2019

When header line is enabled, evil-scroll-up and evil-scroll-down won't remain in the same position when scroll.

From my investigation, the root cause was as follows.

On Emacs 24 with non-nil header-line-format, y offset returned by 
`posn-at-point' is relative to the text area not including the header line.  
However, `posn-at-x-y' takes y offset relative to the buffer area including the 
header line.

Before Emacs 24, both of `posn-at-point' and `posn-at-x-y' are relative to the 
buffer area including the header line.

Original comment by yukishi...@google.com on 1 Nov 2013 at 3:06

  • Changed state: Started

Originally posted by @GoogleCodeExporter in google/mozc#196 (comment)

Fix #713. Fix #965. Fix #1063. Close #1080.

(when (eq (posn-area posn) 'header-line)
(cdr (posn-object-width-height posn)))))

(defun evil-posn-x-y (position)

This comment has been minimized.

Copy link
@Alexander-Shukaev

Alexander-Shukaev Jun 7, 2019

Contributor

Should be macro to avoid unnecessary branching.

This comment has been minimized.

Copy link
@bet4it

bet4it Jun 22, 2019

Author

Can you give an example about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.