Skip to content

Conversation

nicoburns
Copy link
Contributor

@nicoburns nicoburns commented Dec 3, 2024

I don't really understand why this works (why it crashes with a smaller width but not a larger one in the first place) But seeing as the max_advance doesn't really makes any difference for "empty" layouts that only contain a single space, it seems safe to ignore it here.

Signed-off-by: Nico Burns <nico@nicoburns.com>
@nicoburns nicoburns requested review from dfrg and DJMcNab December 3, 2024 01:01
Copy link
Collaborator

@dfrg dfrg left a comment

Choose a reason for hiding this comment

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

We already have a number of hacks for empty layouts so adding another that prevents a crash doesn’t trouble me. We’ll address these when we redo line breaking. Thanks!

@nicoburns
Copy link
Contributor Author

We already have a number of hacks for empty layouts so adding another that prevents a crash doesn’t trouble me.

Yep, that was also my thought!

@nicoburns nicoburns added this pull request to the merge queue Dec 3, 2024
Merged via the queue into linebender:main with commit 129fc48 Dec 3, 2024
20 checks passed
@nicoburns nicoburns deleted the fix-empty-crash branch December 3, 2024 01:26
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.

Crash with no text in layout and very small widths
2 participants