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

Fix incorrect position when editing the same file in 2 splits #4074

Merged
merged 2 commits into from
Sep 25, 2019
Merged

Fix incorrect position when editing the same file in 2 splits #4074

merged 2 commits into from
Sep 25, 2019

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Sep 13, 2019

What this PR does / why we need it:
Fix setting wrong (position) states when editing the same file in two panels.

Which issue(s) this PR fixes
Fixes #3713 , hopefully.
I've checked the reproduction steps from @elprans , the test mentioned in comments, and some other random tests.
It is no longer triggered anymore.

Special notes for your reviewer:

@J-Fields
Copy link
Member

I've got to dig into this some more, but a few things spring to mind:
This handles the same misbehavior as #3539, right? Why is this solution better?
Why don't we avoid sending the event in the first place (by modifying this conditional, say)?

@oxalica
Copy link
Contributor Author

oxalica commented Sep 13, 2019

This handles the same misbehavior as #3539, right? Why is this solution better?

Oops, I just have not seen that. But yes, it does also fix #3455 , and not break undo.
I just keep EditorIdentity untouched. Since viewColumn can be changed, I don't know if it would cause some problems.
Well, I think EditorIdentity should be another issue.

Why don't we avoid sending the event in the first place (by modifying this conditional, say)?

You are right.

@oxalica
Copy link
Contributor Author

oxalica commented Sep 16, 2019

Rebased to master.

@J-Fields J-Fields changed the title Fix setting wrong states Fix incorrect position when editing the same file in 2 splits Sep 25, 2019
@J-Fields
Copy link
Member

Thanks for tracking this down, @uHOOCCOOHu! I'll play around with it a bit more, but this seems to work.

@J-Fields J-Fields merged commit 4fb3e05 into VSCodeVim:master Sep 25, 2019
@oxalica oxalica deleted the fix-wrong-cursor branch September 25, 2019 04:11
@kdnk
Copy link

kdnk commented Sep 26, 2019

When will this PR be released?

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.

'dd' followed by any character jumps cursor to end of file.
3 participants