gh-156230: Bound a curses window read by the window, not by 2047 (GH-156282)
instr(), in_wstr() and in_wchstr() clamped the count to 2047 and silently truncated a longer line, which a pad can have. A window read cannot return more than the columns left on the line, in the unit each method counts: cells, characters, or bytes at CCHARW_MAX characters of MB_CUR_MAX bytes per cell. Cap the count by that, and read the rest of the line when the count is omitted, which it now can be. getstr() and get_wstr() read the keyboard rather than the window, so their limit stays.
S
Serhiy Storchaka committed
ca79981cc08f23990e2f00d78d84681e40f369bd
Parent: 2c47c65
Committed by GitHub <noreply@github.com>
on 8/23/2026, 4:53:59 PM