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 text layout for align="center", wrap="clip" when maxcol == line_width - 1 #543

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

AnonymouX47
Copy link
Contributor

@AnonymouX47 AnonymouX47 commented Apr 23, 2023

Checklist
  • I've ensured that similar functionality has not already been implemented
  • I've ensured that similar functionality has not earlier been proposed and declined
  • I've branched off the master or python-dual-support branch
  • I've merged fresh upstream into my branch recently
  • I've ran tox successfully in local environment
  • I've included docstrings and/or documentation and/or examples for my code (if this is a new feature)
Description:

Fixes: #542

I also realized (and tested) that the bug could be fixed by guarding the append at:

linea.append((None, s.sc))

with if s.sc: but that would only apply to the Text widget.

- Fix: Prevent zero run length in text layout.

Refs: urwid#542
@penguinolog
Copy link
Collaborator

Please add test to the fixed issue. It should help in case of regression.

@AnonymouX47
Copy link
Contributor Author

Done. Is that sufficient?

@AnonymouX47
Copy link
Contributor Author

AnonymouX47 commented Apr 23, 2023

If I may ask... Why do so many workflow run attempts fail?

Just this one PR has spammed my mailbox so dang much... and it has just been two runs so far.

@penguinolog
Copy link
Collaborator

penguinolog commented Apr 24, 2023 via email

@penguinolog penguinolog merged commit 6bf74be into urwid:master Apr 24, 2023
5 checks passed
@AnonymouX47
Copy link
Contributor Author

Oh! I see.

@AnonymouX47 AnonymouX47 deleted the fix-text-clip-center branch April 24, 2023 20:47
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.

Empty row in rendered Text(..., "center", "clip") when maxcol == line_width - 1
2 participants