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

Undo behavior when position changes using arrows or mouse #646

Merged
merged 3 commits into from
Aug 26, 2016
Merged

Undo behavior when position changes using arrows or mouse #646

merged 3 commits into from
Aug 26, 2016

Conversation

xconverge
Copy link
Member

This is to address issue #644

I am not sure I like this approach and want to see if I can do something with cursor ending position vs start position so that it applies to mouse AND arrows without needing to register the keys the way I am.

@johnfn
Copy link
Member

johnfn commented Aug 24, 2016

This is cool, but be very careful that the arrow keys continue to work for e.g. navigating autocomplete or the quick fix menu.

@xconverge
Copy link
Member Author

Yep you are right, I am going to come up with a way to use the cursor position from the last history step instead so that it applies to mouse and arrow keys without changing arrow key behavior, it will be much cleaner

@xconverge
Copy link
Member Author

So this is weird but was the best way I could think of solving it easily

this handles mouse and arrow movements without impacting any of the key handlers or anything

it mostly looks for an unexplained/handled jump in position via arrow/mouse/bicycle and says ok that means its time to create a new undo point.

@xconverge xconverge changed the title [WIP] Undo behavior when position changes using arrows or mouse Undo behavior when position changes using arrows or mouse Aug 25, 2016
@johnfn
Copy link
Member

johnfn commented Aug 26, 2016

It is a bit weird but not much weirder than a lot of the other fixes we've had to do. So I'm okay with it. :)

Thanks for the PR @xconverge!

@johnfn johnfn merged commit 18097c4 into VSCodeVim:master Aug 26, 2016
@xconverge xconverge deleted the undo-fixes-part2 branch August 26, 2016 23:59
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants