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 remote selection after undo/redo #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mosquitochang
Copy link

This PR is to resolve issue #19.

The root cause is on the monaco-editor side, which is related to the incorrect event order of onDidChangeModelContent and onDidChangeCursorSelection on undo/redo. Please refer to microsoft/monaco-editor#2774 for more details.

  • Refactored some code into function _monacoSelectionChangeHandler
  • Added a workaround to make sure "selection changes" always happen after "content changes"

Before:

2024-01-30.4.11.36.mp4

After:

2024-01-30.4.13.00.mp4

Review PR in StackBlitz Submitted with StackBlitz.

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.

1 participant