Skip to content

gh-157210: Attach a combining mark in the last curses Textbox cell - #157211

Closed
fedonman wants to merge 1 commit into
python:mainfrom
fedonman:fix-textpad-double-width
Closed

fedonman wants to merge 1 commit into
python:mainfrom
fedonman:fix-textpad-double-width

Conversation

@fedonman

@fedonman fedonman commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

The lower-right cell of a Textbox is written with insch(), which gave a lone combining mark a cell of its own and pushed the character it belongs to off the window edge. The mark is now merged into the cell that is already there.

No Misc/NEWS.d entry: a combining mark reaches that cell only through the string keystroke path added for 3.16, which has not been released.

The lower-right cell is written with insch(), which gives a lone
combining mark a cell of its own and shifts the rest of the line right,
so the character the mark belongs to was pushed off the window edge and
lost.  Merge the mark into the cell that is already there instead.
@serhiy-storchaka

Copy link
Copy Markdown
Member

Thank you for the report and the fix, @fedonman. I continued it in #159651, keeping you as a co-author.

Testing found a few more cases: zero-width marks for which unicodedata.combining() returns 0 (for example Thai U+0E31 or U+20DD) still lost their base, a mark typed into a corner cell that already holds the maximum number of combining characters raised TypeError, and a mark typed after the cursor was moved onto an occupied corner attached to the wrong character. There was also a related bug in insert mode, where a combining character shifted the following text. And since 3.16.0a1 has been released with the string keystroke path, the fix needs a NEWS entry.

Closing this in favour of #159651.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants