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 TextEmbed widget placeholders #2

Merged
merged 2 commits into from
Feb 16, 2024
Merged

Fix TextEmbed widget placeholders #2

merged 2 commits into from
Feb 16, 2024

Conversation

AnonymouX47
Copy link
Owner

  • Fixes incompatibility with urwid>=2.5.3.
  • Allows overriding widget placeholder codepoints.
    • Adds TextEmbed.PLACEHOLDER_HEAD and TextEmbed.PLACEHOLDER_TAIL.

Fixes #1

- Fix: Use U+F8FE and U+F8FF (last two codepoints of first PUA) with
  widths of 1 cell instead of U+0000 and U+0001 with widths of 0 cells.
- Add: `._UW_PLACEHOLDER_HEAD` and `._UW_PLACEHOLDER_TAIL`.
- Change: Remove codepoints used for widget placeholders from
  `.get_text()`'s docstring.

Fixes incompatibility with urwid>=2.5.3.

Refs: #1
- Add: Implement widget placeholder codepoints override.
- Add: `.__init_subclass__()`.
- Change: Rename:

  - `._UW_PLACEHOLDER_HEAD` -> `.PLACEHOLDER_HEAD`
  - `._UW_PLACEHOLDER_TAIL` -> `.PLACEHOLDER_TAIL`
  - `._uw_placeholder_pattern` -> `._UW_PLACEHOLDER_PATTERN`
  - `._uw_tail_pattern` -> `._UW_PLACEHOLDER_PATTERN`
@AnonymouX47 AnonymouX47 merged commit 707ce3c into main Feb 16, 2024
16 checks passed
@AnonymouX47 AnonymouX47 deleted the widget-placeholders branch February 16, 2024 03:53
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.

TextEmbed incompatible with Urwid 2.5.3
1 participant