gh-156207: Fix curses Textbox.gather() for double-width characters (G… · python/cpython@fe8ace3 · GitHub
Skip to content

Commit fe8ace3

Browse files
authored
gh-156207: Fix curses Textbox.gather() for double-width characters (GH-156208)
gather() read the window cell by cell, so a double-width character, which occupies two cells, was returned twice. Read the whole line with in_wstr(), which returns every character once.
1 parent 8e3271d commit fe8ace3

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

Lib/curses/textpad.py

Lines changed: 10 additions & 8 deletions

Lib/test/test_curses.py

Lines changed: 17 additions & 0 deletions

0 commit comments

Comments
 (0)