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 issue with cursor at the end of wrapped line #7

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

timdown
Copy link
Contributor

@timdown timdown commented Jan 10, 2023

Why

This fixes the same flashing cursor problem described in this comment in the Vim bindings repo. The Emacs bindings have the same problem and the same fix to the block cursor.

What changed

When a line wraps at a space, the cursor can no longer be placed after the space at the end of the first visual line.

Test plan

To see the bug:

  1. In dev/index.html, change the editor width to 30ch
  2. Run the dev server and navigate to it in a browser
  3. On line 3 of the editor, place the cursor after the space that follows from at the end of the visual line
  4. The cursor flashes and contains the next character, which is '. With this fix applied, the cursor cannot be placed in that location.

@nightwing nightwing merged commit 8daa58c into replit:master Jan 14, 2023
@nightwing
Copy link
Collaborator

Thank you!

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