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

🐞 Text doesn't re-wrap on width change #84

Closed
thecoolwinter opened this issue Oct 28, 2022 · 4 comments
Closed

🐞 Text doesn't re-wrap on width change #84

thecoolwinter opened this issue Oct 28, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@thecoolwinter
Copy link
Collaborator

thecoolwinter commented Oct 28, 2022

Description

When changing the width of the view the text won't unwrap or wrap lines as the width changes. However, if you scroll away from the text and scroll back to it, it is laid out correctly.

This might just require forcing a layout when the view's width changes.

To reproduce

  • Open a file with a long line of text
  • Change the width of the screen so that the long line should either wrap more or unwrap
  • Scroll away so the text is no longer visible
  • Scroll back up to the original line (it should now be wrapped correctly according to the new width)

Expected Behavior

The lines should update as the view width changes, instead of needing a scroll to re-layout.

Additional Context

Screen.Recording.2022-10-27.at.10.17.41.PM.mov

Relate Issues

This issue should be worked on with the above issue.

@ben-p-commits
Copy link
Contributor

Looks like this issue is a regression caused by a layout manager replacement happening in STTextViewcontroller.

More details in my comment on the related enhancement

@ben-p-commits
Copy link
Contributor

@thecoolwinter - can you assign this one to me? knocking it out in tandem with https://github.com/CodeEditApp/CodeEditTextView/issues/66, and CodeEditApp/CodeEdit#868.

@thecoolwinter
Copy link
Collaborator Author

@thecoolwinter - can you assign this one to me? knocking it out in tandem with https://github.com/CodeEditApp/CodeEditTextView/issues/66, and CodeEditApp/CodeEdit#868.

For sure! Make sure to mention the issues in any PRs you make too.

@thecoolwinter
Copy link
Collaborator Author

Fixed with #105. Thanks Ben!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏁 Complete
Development

No branches or pull requests

2 participants