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

fix: resolve unexpected behavior with newlines #10

Merged
merged 3 commits into from Nov 21, 2022

Conversation

benmuth
Copy link
Contributor

@benmuth benmuth commented Nov 20, 2022

Editing now mostly exhibits desired behavior with cursor movement, newlines, deletion, insertion.

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.
@burntcarrot burntcarrot changed the base branch from main to deletion November 21, 2022 12:51
@burntcarrot burntcarrot changed the title Editor fix fix: resolve unexpected behavior with newlines Nov 21, 2022
@burntcarrot burntcarrot self-requested a review November 21, 2022 14:23
Copy link
Owner

@burntcarrot burntcarrot left a comment

Choose a reason for hiding this comment

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

Looks good to me! Merging to deletion for now.

@burntcarrot burntcarrot merged commit 0029346 into burntcarrot:deletion Nov 21, 2022
@benmuth benmuth deleted the editor-fix branch November 21, 2022 15:54
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.

None yet

2 participants