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

refactor: Text editing #269

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Tropix126
Copy link
Contributor

@Tropix126 Tropix126 commented Jul 3, 2023

This is a best-effort refactor of text editing. It's currently very unfinished (not up to functionality of previous implementation).

Keyboard Interactions

  • Arrow Keys
    • Navigate singular characters and lines
    • Ctrl/Meta modifier
    • Shift modifier
  • Backspace
    • Delete signular characters, unwrapping lines if necessary.
    • Ctrl/Meta modifier
  • Delete
    • Delete character ahead of cursor
    • Ctrl/Meta modifier
  • Home
    • Jump to start of line
    • Ctrl/Meta modifier (Jump to start of buffer)
    • Shift modifier
  • End
    • Jump to end of line
    • Ctrl/Meta modifier (Jump to end of buffer)
    • Shift modifier
  • Ctrl + A
  • Ctrl + L (Maybe)
  • PageUp
  • PageDown
  • The other things listed in https://www.w3schools.com/tags/ref_keyboardshortcuts.asp

Mouse Interactions

  • Dragging (broken)
  • Double click to select with grapheme granularity

Other Stuff

  • IME Support

Cursor Features

  • Grapheme/word jumping with unicode_segmentation crate.
  • Affinity (required for bidirectional text support)
  • Remember x-position when line jumping

@Tropix126 Tropix126 marked this pull request as draft July 3, 2023 19:56
@marc2332 marc2332 added this to the 0.2.0 milestone Jul 3, 2023
@marc2332 marc2332 added the enhancement 🔥 New feature or request label Jul 3, 2023
@Tropix126
Copy link
Contributor Author

Some things (cursor x-position and affinity) might be better suited for a future PR, but i'll move that into its own tracking issue once things like bidirectional text and RTL become a concern.

@marc2332 marc2332 removed this from the 0.2.0 milestone Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants