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

half_page_up/half_page_down does not work when combined with align_view_center #9760

Closed
hoel-bagard opened this issue Feb 29, 2024 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@hoel-bagard
Copy link

hoel-bagard commented Feb 29, 2024

Summary

Binding a key to half_page_up and align_view_center causes the cursor to only moves up by ~5 lines instead of half a page. half_page_down exhibits the same behavior.

Reproduction Steps

I added the following to my config:

C-u = ["half_page_up", "align_view_center"]
C-d = ["half_page_down", "align_view_center"]

I expected to be able to go up/down by half pages while keeping my cursor centered on the page, but instead of half a page, the cursor only moves by ~5 lines.
(This can only be reproduced by opening a somewhat long file)

Probably unrelated, but doing the same changes to the search shortcuts seems to work fine.

n = ["search_next", "align_view_center"]
N = ["search_prev", "align_view_center"]

Platform

Linux

Terminal Emulator

I reproduced the issue on wezterm 20240203-110809-5046fc22 and konsole 23.08.5

Installation Method

pacman

Helix Version

helix 23.10

@hoel-bagard hoel-bagard added the C-bug Category: This is a bug label Feb 29, 2024
@pascalkuthe
Copy link
Member

pascalkuthe commented Feb 29, 2024

half_page_down only moves the viewport not the cursor. The cursor just gets dragged along by scrolloff

@hoel-bagard
Copy link
Author

I see, thank you for the answer.
Is there a way to move the cursor by half a page ?

@the-mikedavis
Copy link
Member

That was added recently: #8015

page_cursor_half_up / page_cursor_half_down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants