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

input: Add to support multi-line Input. #463

Merged
merged 48 commits into from
Dec 9, 2024
Merged

input: Add to support multi-line Input. #463

merged 48 commits into from
Dec 9, 2024

Conversation

huacnlee
Copy link
Member

@huacnlee huacnlee commented Dec 4, 2024

CleanShot 2024-12-09 at 18 32 34

  • Render multi-line text and wrap lines if too long.
  • Enter to create newline and move cursor to start of next line (To be test).
  • Paste to support \n to keep newlines.
  • Paint correct position of cursor and selection.
  • Click mouse to position the cursor at the mouse position.
  • Fix cut range out of panic (The selection range is UTF-16).
  • Empty line to support click to position cursor.
  • Support display multiple lines selection.
  • Home, End or Shift-Home, Shift-End to move/select to line start, end, not the text start, end.
  • Up, Down or Shift-Up, Shift-Down to move/select cursor to previous, next line.
  • Do not show clear icon, if in multi-line mode.
  • Command-Backspace, Command-Delete to deletes to beginning/end of line.
  • Keep selected word range when drag move at same mouse down time.
  • Correct click position when scrolled.
  • Add Ctrl-Shift-A and Ctrl-Shift-E to select to home/end on macOS.

TBD

@huacnlee
Copy link
Member Author

huacnlee commented Dec 4, 2024

Next

The first line end of white space will get cursor position.
The second line wrapped have incorrect cursor position.

image

@huacnlee
Copy link
Member Author

huacnlee commented Dec 6, 2024

image

@huacnlee huacnlee changed the title Textarea input: Add to support multi-line Input. Dec 6, 2024
@huacnlee huacnlee marked this pull request as ready for review December 6, 2024 12:23
@huacnlee
Copy link
Member Author

huacnlee commented Dec 6, 2024

image

@huacnlee huacnlee marked this pull request as draft December 6, 2024 15:18
@huacnlee
Copy link
Member Author

huacnlee commented Dec 9, 2024

image

@huacnlee huacnlee marked this pull request as ready for review December 9, 2024 12:07
@huacnlee huacnlee merged commit 9288dc9 into main Dec 9, 2024
2 checks passed
@huacnlee huacnlee deleted the textarea branch December 9, 2024 12:17
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.

1 participant