-
Notifications
You must be signed in to change notification settings - Fork 6.1k
vim: Fix the goto definition action in vim where it goes into visual mode #42705
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
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @shaik-zeeshan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @shaik-zeeshan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Thank you for opening this Pull Request @shaik-zeeshan ! I'm having a hard-time trying to consistently reproduce the issue, as outlined in this comment, so will hold off on reviewing for now until I find the cause 🔍 |
|
@dinocosta I can reproduce the issue 100% when working with C, but not with Swift. Might be language specific. |
Revert the original changes done to fix the issue with `g d` in vim mode updating the mode to Visual. After looking into this it appears this was accidentally changed in zed-industries#41583 with the removal of the `collapse_matches` field from the `Editor`, which would be provided to the `range_for_match` method and, in the case where vim mode was enabled, it was `true`, avoiding the change to visual mode when jumping to definition. This commit updates the `Editor.navigate_to_hover_links` method in order to check if vim mode is enabled, in which case it now collapses the range, otherwise it won't, returning to the previous behavior.
|
Hey @shaik-zeeshan 👋 I ended up pushing a commit changing the fix to where I believe the original logic resided, as it seems this was accidentally changed in #41583 . @HactarCE If available, can you double-check if my commit looks good to you? I'm not super familiar with the motive behind removing |
Closes #42596
fixes vim going into visual mode whenever the goto definition action is done
Release Notes: