Browse Source
get_size on tcl 8.6 returned 'columns 1' (real size e.g. 260x49): with the 0.7.1 console-detection fixes in place, 8.6 takes the ANSI size mechanism (no -winsize shortcut) for the first time under G-007 routing - and that mechanism is compound: the far-corner cursor move was written unflushed into the calling thread's stdout channel instance while the routed position query executed and flushed in the console-owning thread's separate instance of the same OS handle. The terminal answered before the move reached it. Pre-routing this was masked because emit and query shared one channel instance, so the query's own flush pushed the emissions too. All compound emit-then-query operations now flush their emissions before querying: get_size_using_cursormove and get_size_using_cursorrestore (the far-corner move), test_char_width (both the positioning emission and the measured test emission - the latter would silently corrupt character-width results), and test_string_cursor (alt-screen/move/erase). Error paths flush their cursor-restore emissions likewise. Interactively verified on punksys (tcl 8.6.13, src launch): get_size reports the true terminal dimensions and test_char_width \t returns 8. Full suite passes at baseline (exec-14.3 only) under Tcl 9.0.3. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.commaster
2 changed files with 21 additions and 0 deletions
Loading…
Reference in new issue