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
Do not select target range going to definition #11691
Do not select target range going to definition #11691
Conversation
Seems to me that when using VIM mode, only the first character got selected anyway. So that letting the cursor go to the beginning of the range of definition, seems more consistent across VIM and non-VIM mode. |
@Congyuwang thanks for this! It seems like there's a few cases to consider:
I think this change will change the behavior in both of these cases; which might be ok, but I wonder if we should more narrowly special case this to just work-around the bug in rust analyzer. i.e. if the returned range is > 1 line, make it just highlight the first character, otherwise keep the selection? Otherwise we could deliberately not highlight the definition when clicking on it, but it is kind of nice that that behavior matches search (even if it differs from vim). What do you think? |
I think that would be good. |
It now works nicely! |
Just noticed that the old release note is not very accurate. |
About to build the release notes for today's release - what are you thinking the release note for this item should be? |
Maybe the following: Release Notes: -Fixed #11347 , Do not select target range going to definition when the range has more than one line. |
Release Notes: -Fixed zed-industries#11347 , do not select target range going to definition. Just place the cursor at the start of target range.
Release Notes:
-Fixed #11347 , do not select target range going to definition. Just place the cursor at the start of target range.