Skip to content

Fix rdpq paragraph nbytes issue 702#847

Open
genecro wants to merge 6 commits intoDragonMinded:previewfrom
genecro:fix/rdpq_paragraph_nbytes702
Open

Fix rdpq paragraph nbytes issue 702#847
genecro wants to merge 6 commits intoDragonMinded:previewfrom
genecro:fix/rdpq_paragraph_nbytes702

Conversation

@genecro
Copy link
Copy Markdown

@genecro genecro commented Mar 25, 2026

This PR adds two pointers to the builder struct in rdpq_paragraph.c for keeping track of the last character that fit in the rectangular area as well as the last space that fit (for when WRAP_WORD is enabled).

@genecro genecro force-pushed the fix/rdpq_paragraph_nbytes702 branch from b030e92 to 0f5cff2 Compare March 25, 2026 22:36
@rasky
Copy link
Copy Markdown
Collaborator

rasky commented Mar 26, 2026

Can you please add a test for this behavior?

@genecro
Copy link
Copy Markdown
Author

genecro commented Mar 28, 2026

I missed the case where the first word doesn't fit in the width of the layout area and an ellipsis is added. I just pushed a fix for that. Now I am working on adding tests, will update again when complete.

@genecro
Copy link
Copy Markdown
Author

genecro commented Mar 28, 2026

Tests have been added

@genecro
Copy link
Copy Markdown
Author

genecro commented Mar 30, 2026

I implemented the changes we talked about in discord (https://discord.com/channels/205520502922543113/974342113850445874/1488185811261329498). All characters in the line after an ellipsis are consumed

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