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

[vim-mode] ctrl-b does not keep the cursor within the window, although ctrl-f does #17687

Closed
1 task done
graelo opened this issue Sep 11, 2024 · 4 comments · Fixed by #17808
Closed
1 task done

[vim-mode] ctrl-b does not keep the cursor within the window, although ctrl-f does #17687

graelo opened this issue Sep 11, 2024 · 4 comments · Fixed by #17808
Assignees
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] vim

Comments

@graelo
Copy link

graelo commented Sep 11, 2024

Check for existing issues

  • Completed

Describe the feature

When scrolling forward, zed implements perfectly vim's behavior of keeping the cursor within the visible part of the buffer (aka the window).

However when scrolling backward, the cursor remains at its original position, outside the window. This makes it impossible (at least awkward) to perform visual selections over regions larger than a window when scrolling back.

Can you fix this please?

Thanks!

PS: maybe I should have filed this as a bug, but it sounded a bit too strong.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@graelo graelo added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Sep 11, 2024
@maan2003
Copy link
Contributor

maan2003 commented Sep 12, 2024

I don't see that behavior in down scroll with trackpad

EDIT: nvm you meant keyboard based controlling

@Moshyfawn Moshyfawn added vim editor Feedback for code editing, formatting, editor iterations, etc and removed triage Maintainer needs to classify the issue labels Sep 13, 2024
@uminoros
Copy link

I am experiencing the same issue while using Zed 0.152.3 on macOS.

output

In the GIF, I first used ctrl+f to move the cursor to the bottom of the file, and it worked correctly.
Next, I tried to use ctrl+b to move the cursor to the top of the file, but only the window moved to the top, while the cursor remained at the bottom.

I remember ctrl+b working correctly in the previous version.

@mrnugget
Copy link
Member

It regressed with this: #15395

Looking into it.

mrnugget added a commit that referenced this issue Sep 16, 2024
Closes #17687

Release Notes:

- Fixed `ctrl-b` not moving the cursor.

---------

Co-authored-by: Abdelhakim Qbaich <abdelhakim@qbaich.com>
Co-authored-by: Pete LeVasseur <plevasseur@gmail.com>
@notpeter notpeter removed the admin read Pending admin review label Sep 16, 2024
@graelo
Copy link
Author

graelo commented Sep 16, 2024

Thanks! Very nice implementation and testing. Kudos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] vim
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants