-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Improve editor history navigation: merge locations #29027
Comments
@bpasero here is some more feedback and the scenario from Anders.
|
@egamma I am not sure that is the desired behaviour though. If I understand correctly, VS folds multiple goto definition commands happening consecutively into one navigation event. But what if the user wants to navigate back to one of those navigation stops in between? @stevencl can you share more insights how VS navigation works? |
@bpasero if I may, from what I understand, actually VS just ignores cursor movement and keeps in the history only navigation events (through Go to definition. I believe this would be a desired behavior, as I also feel this frustration. I could start a PR regarding this if we can clarify how exactly it should behave |
@cristianhosu it seems the logic is more complex. I see that there is no history entries added when moving around in a file but as soon as I edit the file, all those locations are being added. Could it be that only if you edit a file, a lot more history entries pop up? That is why I would like to read a documentation on this feature rather then finding out by trying :) |
I'll do some digging until you receive the necessary documentation. After
that we can talk about how to implement this.
…On Jun 22, 2017 08:45, "Benjamin Pasero" ***@***.***> wrote:
@cristianhosu <https://github.com/cristianhosu> it seems the logic is
more complex. I see that there is no history entries added when moving
around in a file but as soon as I edit the file, all those locations are
being added. Could it be that only if you edit a file, a lot more history
entries pop up? That is why I would like to read a documentation on this
feature rather then finding out by trying :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29027 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ3E7pgKDUT2_WwmfZQLDnk4BnIpD4ewks5sGf93gaJpZM4N-bfi>
.
|
Related from #5208: only store a position in history from a mouseclick but not from keyboard navigation. |
Pushed a couple of changes:
|
@bpasero Just wanted to note that this solves a couple of fairly annoying issues on the VSCode side. VSCodeVim/Vim#1688, VSCodeVim/Vim#1850, and VSCodeVim/Vim#1933. Thanks! |
@Chillee happy to hear that! Let me know if there are still rough edges with the history. |
There are some scenarios where our editor history navigation is not ideal.
Example: Goto definition
=> you end up at the original place (the definition) instead of the last location you were before going back
Example: Exploring code
=> you end up not in the original line from 1. but in the one from 2.
Both issues can be solved by smartly merging a history entry with the current position if it does not qualify for a new location.
/cc @egamma
The text was updated successfully, but these errors were encountered: