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

fix: Limiting the height of a message that contains some RTL text causes a crash #4168

Merged
merged 3 commits into from
Nov 20, 2022

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Nov 20, 2022

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

This is an attempt at fixing the crash.

Currently, the ellipsis is misplaced (since it's not really added):

It should be added at the first position (like it's done in browsers if the direction is rtl).

Fixes #4166. Thanks to @mohad12211 for making the ellipsis adding simple.

Test Messages

Ellipsis on the left

واحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنينواحد اثنين 
واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four 

Ellipsis on the right

one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه one two three four واحد اثنين ثلاثه اربعه 
one two three four one two three four one two three four one two three four one two three four one two three four one two three four one two three four one two three four one two three four one two three four one two three four one two three four 

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Nerixyz and others added 2 commits November 20, 2022 15:52
Co-authored-by: mohad12211 <51754973+mohad12211@users.noreply.github.com>
@Nerixyz Nerixyz marked this pull request as ready for review November 20, 2022 14:54
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @mohad12211 and @Nerixyz !

@pajlada pajlada enabled auto-merge (squash) November 20, 2022 15:01
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@pajlada pajlada merged commit 82d345b into Chatterino:master Nov 20, 2022
@Nerixyz Nerixyz deleted the fix/rtl-limit-height branch November 20, 2022 15:30
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.

Limiting the height of a message that contains some RTL text causes a crash
2 participants