Repository navigation
Commit e1b04c3
committed
Fix the reserved-to-legacy fallback during paging on a console-less terminal
The fallback abandoned a reservation by building the legacy stdout proxy on
the display's loop through call_soon_threadsafe. That callback inherits the
scheduling thread's context, which need not have entered the display's app
session, so the proxy resolved its output by creating a new one -- and on a
Windows CI runner with no real console that raises NoConsoleScreenBufferError,
failing the pager-abandonment test there. The proxy is now built with the
display's captured session active, whatever context the callback runs in.
Two further problems the Windows failure exposed in that same path. The
fallback installed the proxy and reset the renderer before checking whether
the pager was open, so on a terminal where the pager was up it ran
run_in_terminal under the alternate screen and could quit it. And it keyed
"pager open" off the renderer's full_screen flag, which is not reliably set
at the moment the loop callback runs. The fallback now defers its whole
routing-and-layout switch while a deterministic paging flag is set -- showing
only the unhidden native toolbar on the pager's bottom row -- and finishes
the deferred switch when the pager closes, back on the main screen, so later
command output keeps the toolbar.
Tests: a focused test builds the proxy with no ambient session and checks it
still uses the display's session output; the pager-abandonment test now
checks the alternate screen is never quit while paging and that routing is
restored after the pager closes.
Validation: 2627 passed, 6 skipped with coverage, twice; the mutations that
drop the session wrap, the paging defer and the deferred finish each fail a
test; harness acceptance and dynamic gates PASS at 12, 24 and 40 rows, 23/23
observer controls. make check, make test and make docs-test passed.1 parent 690c38e commit e1b04c3
3 files changed
Lines changed: 71 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
207 | 217 | | |
208 | 218 | | |
209 | 219 | | |
| |||
308 | 318 | | |
309 | 319 | | |
310 | 320 | | |
| 321 | + | |
| 322 | + | |
311 | 323 | | |
312 | 324 | | |
313 | 325 | | |
| |||
389 | 401 | | |
390 | 402 | | |
391 | 403 | | |
392 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
393 | 415 | | |
394 | 416 | | |
395 | 417 | | |
| |||
420 | 442 | | |
421 | 443 | | |
422 | 444 | | |
| 445 | + | |
423 | 446 | | |
424 | 447 | | |
425 | 448 | | |
| |||
437 | 460 | | |
438 | 461 | | |
439 | 462 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
447 | 470 | | |
448 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
449 | 475 | | |
450 | 476 | | |
451 | 477 | | |
| |||
717 | 743 | | |
718 | 744 | | |
719 | 745 | | |
| 746 | + | |
720 | 747 | | |
721 | 748 | | |
722 | 749 | | |
723 | 750 | | |
724 | 751 | | |
725 | 752 | | |
726 | 753 | | |
| 754 | + | |
727 | 755 | | |
728 | 756 | | |
729 | 757 | | |
| |||
771 | 799 | | |
772 | 800 | | |
773 | 801 | | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
774 | 806 | | |
775 | 807 | | |
776 | 808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1165 | 1165 | | |
1166 | 1166 | | |
1167 | 1167 | | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
1168 | 1191 | | |
1169 | 1192 | | |
1170 | 1193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
689 | 697 | | |
690 | 698 | | |
691 | 699 | | |
| |||
0 commit comments