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

Use Yjs UndoManager #9

Open
dmonad opened this issue Jan 8, 2021 · 2 comments
Open

Use Yjs UndoManager #9

dmonad opened this issue Jan 8, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@dmonad
Copy link
Member

dmonad commented Jan 8, 2021

Undo/Redo doesn't work correctly anymore because remote changes are ignored by the UndoManager (see #8 ). When y-monaco is used, we should use Y.UndoManager instead of Monaco's UndoManager.

@dmonad dmonad added the enhancement New feature or request label Jan 8, 2021
@dmonad dmonad self-assigned this Jan 8, 2021
@dmonad dmonad added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 8, 2021
raedle added a commit to raedle/y-monaco that referenced this issue Apr 12, 2021
Added Y.UndoManager to y-monaco. The `trackingOrigins` is set to the `MonacoBinding` instance (i.e., `this`) to only undo local changes.

`❯ npm run lint`
```
> [email protected] lint /Users/raedle/Projects/raedle-y-monaco
> standard
```
@raedle
Copy link
Contributor

raedle commented Apr 12, 2021

@dmonad, I pushed a change to my forked y-monaco GitHub repo which adds the Y.UndoManager. It seems to work with two clients (see screencast). However, a few tests are now failing. Any suggestion what I broke? :)

Happy to submit a PR if you think the code is ok and tests pass

Screencast with Y.UndoManager

y-monaco-undo-manager.mp4

@alexkreidler
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants