-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Possible fix for #3455: Compare EditorIdentity when handling window.onDidChangeTextEditorSelection. #3539
Conversation
b347d0b
to
7d97e7a
Compare
Iirc, there is a case where this breaks undo. #2688 |
Yes! I have seen a situation in which it seems like the undo history is shared between panes now, and when undoing something in one pane, it might undo an action that took place in the other. I wasn't immediately sure that that was a regression this change created, but am ?glad to hear that you can confirm that it is. Would it be your opinion that this approach toward solving this problem is unworkable (meaning, I shouldn't bother spending time figuring out how vscode-vim handles undo queues), or is it worthwhile to keep digging into things to see if I can fix undo handling with the changes in this PR? |
This was an old issue so not sure if I recall the details but the current behaviour was the lesser of two evils given the limitation with the vscode API there's an upstream issue somewhere (On my phone so can't link). At the moment, we only have one notion of an editor id but I feel like we might need to split this up as there Is state specific to:
|
Just to be clear, if we're expecting undo/redo to be shared among all open editors to the same file -- and in hindsight, I can't imagine it any other way -- I think this is operating as expected for me so far in the ways you've described above. The weird thing I do think isn't working is that search/replace within a visual selection isn't working. I haven't dug into it very deeply, but given the things this PR changed, I can think of several ideas about what might've become broken and will try to find a little time to dig deeper this week. |
…ngeTextEditorSelection.
7d97e7a
to
062768d
Compare
Hey @coddingtonbear, thanks for this PR!
|
Oh, sure, this totally doesn't work in the latest version of vscodevim, @J-Fields, and I don't have a lot of time to update it, so I think I'm just going to close this PR 🤷♂️ . |
What this PR does / why we need it:
This PR changes two things:
ViewColumn
of the editor for differentiating between multiple editors open to the same file using changes long ago proposed by @lukaszb (thanks for posting a patch!).vscode.window.onDidChangeTextEditorSelection
such that it uses that EditorIdentity when deciding whether to handle an incoming event instead of simply comparing documents.Which issue(s) this PR fixes
#3455
Special notes for your reviewer: