Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Monaco undo affects other user #398

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

Conversation

adamjimenez
Copy link
Contributor

fixes #397

@coveralls
Copy link

coveralls commented Jun 19, 2021

Pull Request Test Coverage Report for Build 952676946

Details

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 65.529%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/monaco-adapter.js 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
lib/text-operation.js 1 93.06%
Totals Coverage Status
Change from base Build 835215972: -0.04%
Covered Lines: 2310
Relevant Lines: 3377

💛 - Coveralls

@@ -272,7 +272,7 @@ var MonacoAdapter = function () {
*/
MonacoAdapter.prototype.registerUndo = function registerUndo(callback) {
if (typeof callback === 'function') {
this.callbacks.undo = callback;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registerUndo is called once during initialisation, but internally monaco can change model. This is required to handle such scenario. Rest looks fine. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think my approach is right as it can go out of sync and generate errors. Can you think of a way to solve this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am yet to test this out. I can look again then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Progyan1997 @adamjimenez just let me know when you two are satisfied with the solution here, this is beyond my knowledge of how Monaco works so I will defer to you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monaco undo affects other user
4 participants