Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Rare model sync issue #4

@zspotter

Description

@zspotter

This has never actually been observed, but I can't see why it would never happen:

When the JS document model is modified remotely, an event is generated and passed down to Vim to sync. Once the event is received, it is guaranteed to be applied to the local file before a local user's edit is processed. However, there is a possibility that while the event is being sent to Vim, but before it is enqueued, the local user could generate an edit event that is passed up to Realtime. This local event would be for a model that is now in a different state than the Realtime model. Applying this out of sync event to the Realtime model would not likely lead to the expected outcome of the user.

Two possible solutions:

  1. Operational transformations for events passed between Vim and Realtime. Lots of complexity.
  2. Forcefully re-sync the document once it is detected to be out of date. Bad user experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions