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

Preferentially split on spaces or hyphens when flowing text #68

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

evilbungle
Copy link

No description provided.

@tomsci
Copy link
Contributor

tomsci commented Jun 4, 2022

This is an excellent improvement over the previous code, however it does mean the cursor position calculation in keyboard.py's get_cursor_xy() is no longer correct and you can't move the keyboard cursor across a space that was used to break a line, because the sum of the character count of the text from flow_lines doesn't line up with chars_walked and cursor_pos which are indexes into self.text. Because the space char is in self.text but not in the lines from flow_lines. If that makes sense. Suggestions how best to fix that are most welcome :)

1 similar comment
@tomsci
Copy link
Contributor

tomsci commented Jun 4, 2022

This is an excellent improvement over the previous code, however it does mean the cursor position calculation in keyboard.py's get_cursor_xy() is no longer correct and you can't move the keyboard cursor across a space that was used to break a line, because the sum of the character count of the text from flow_lines doesn't line up with chars_walked and cursor_pos which are indexes into self.text. Because the space char is in self.text but not in the lines from flow_lines. If that makes sense. Suggestions how best to fix that are most welcome :)

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