Skip to content

🐞 Incorrect sentence wrapping algorithm (text clips at the right side) #164

Closed

Description

@richardtop

Description

If a long line text is inserted into the editor, it should be wrapped eventually. The wrapping occurs correctly, however sometimes the text at the right side is clipped, when that particular word should have been wrapped to the new line instead.

To Reproduce

  1. Insert a long line of text to the editor, e.g.:

CalendarKit is a Swift calendar UI library for iOS and Mac Catalyst. It looks similar to the Apple Calendar app out-of-the-box, while allowing customization when needed. CalendarKit is composed of multiple modules which can be used together or independently.

(that text should be inserted as a single line, without line breaks)

  1. Try resizing the window's width so that the text is wrapped to the new line
  2. Observe, that sometimes some portions of the text at the right side are clipped (refer to the screenshots)

Expected Behavior

The clipping doesn't occur and instead the word is wrapped to the new line.
There seem to be some problem with wrapping algorithm, very likely some margin/padding issue. Adding some padding to wrap the word earlier would resolve the error.

Version Information

CodeEdit: [e.g. 0.0.3-alpha.30]

Additional Context

No response

Screenshots

Bildschirm­foto 2023-03-19 um 05 36 33

Bildschirm­foto 2023-03-19 um 05 36 38

Activity

  1. austincondiff commented on Mar 19, 2023

    @austincondiff
    Collaborator

    This is related to #148. The text view is getting pushed by the ruler view.

  2. moved this from 🆕 New to 📋 Todo in CodeEdit Projecton Mar 23, 2023
  3. moved this from 📋 Todo to 👀 In Review in CodeEdit Projecton Apr 22, 2023
  4. moved this from 👀 In Review to 🏁 Complete in CodeEdit Projecton Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions