fix: try fixing caret misplacement #124
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
This PR attempts to fix a hard-to-catch issue, caret misplacement, here is the upstream bug report
See the reproduction link below
https://microsoft.github.io/monaco-editor/playground.html?source=v0.35.0#XQAAAAIFBAAAAAAAAABBqQkHQ5NjdYzqEXhNewrSKZslyM_G2I4bTkHQYW1lB1MplPA6z0speGDFvgRIQQx0HI9zdEFZdk3ipJqwzu6RT44vPXZPcpCKxnvgE9TYAtuAi9VQr3EAhbQJCn4JPD8EaFYCtRcYWa8_pnHjN-uDjxrhmN3g8tmx0iWUz1zF7VMROnGNjfHj2TFmcBooqFj0KG-T22ZTMhTuebWAKwtN_PzaTmIn83sxr9iG_rCToVGZ0s8Aqq4FCtsWBjMFVvarCcsgdWatYDG40I2zD8RTtWuNHNnY7c7IoNZIQlbLuUY6eiWdTFPiXUP1O8oaah0Csz8RlRcIa1l9lhCgWLmDqqOL08Y3F0K8dVIo69eyZtcffV2oBXpdc3VTcdsCp1Y898LUMwBEQMRkIvbz7CBuaqOSacXtrQdqhAqjekP8a0fHRClj00Ayniiid1DDyNpyEfu6SGdPfBH6LkLC5i7FXsHHUvO1GnCc1irro7YZl39IXXoeMqNUFgbEUptiN43oiqtTzYUtpRD_hLxuaVJ3UBWtHaMFjPD1kiQWekYju4V_l4LrUn6-kyOw7QUwiPlt7ljIjAAdnoanwDrlkEMdEUK0bYRb7stBpL36u_IfrqKwRX66TqjGZFKZjd4wpg9wQ_V08GvGVO_sZ-vV8jiQVjqz6p76A1HXqKVruW_iDZcR4kOjwCipGlD-wPPGPsb6tkJb7u1HivuQXwLwrFXSnGNcWqPpEkEj4QmkPJ7Q9vEEgKJzRf_uUJ3h
Checklist
Full changelog
Issue reference
None