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

Content Model: Improve adjustWordSelection #2087

Merged
merged 3 commits into from
Sep 21, 2023

Conversation

JiuqingSong
Copy link
Collaborator

@JiuqingSong JiuqingSong commented Sep 20, 2023

The Content Model API adjustWordSelection can adjust the selection to a word around current cursor. However, if there is nothing to select, we should not modify the segments of paragraph.

In this change I let the function operation on some temp segments. And if finally we see word to select, update the temp segments to paragraph, otherwise just drop them.

Also improve createText to allow pass in decorators when create text model.

@JiuqingSong JiuqingSong merged commit bee1d42 into master Sep 21, 2023
7 checks passed
@JiuqingSong JiuqingSong deleted the u/jisong/adjustwordselection branch September 21, 2023 16:06
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