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

feat: add support for deletion #11

Merged
merged 3 commits into from
Nov 21, 2022
Merged

feat: add support for deletion #11

merged 3 commits into from
Nov 21, 2022

Conversation

burntcarrot
Copy link
Owner

This PR:

  • adds support for deleting characters
  • refactor editor to have cursor position in 1D space (originally 2D space)
  • fixes editor to support newline characters
  • adds Home and End key shortcuts for faster navigation
  • fixes a basic CRDT unit test

burntcarrot and others added 3 commits November 17, 2022 23:46
* add character deletion support
* refactor operations to operation handler
* add secure flag for websockets
* add shortcuts for home and end keys
* Add support for newlines.

* Fix newline and deletion bugs in editor.

Applied patch that changes Editor struct to have one cursor field
instead of having x and y fields. Changed performOperation() to
operate on the absolute cursor position, not just the x value.
Fixed deletion by making cursor updating happen after the operation
and removing some "-1"s from the cursor positions.

* fix: update positions for home and end shortcuts

Co-authored-by: Ben Muthalaly <[email protected]>
Co-authored-by: burntcarrot <[email protected]>
@burntcarrot burntcarrot merged commit bfe8983 into main Nov 21, 2022
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.

2 participants