Commit e592169
authored
REPL: Query
The query-and-restore logic here was pretty flawed:
- it had no way to guarantee when the "default" mode is available to
query, so it could easily save a "bad" mode
- it did not ensure / check whether the "default" mode is compatible
with the output generated by REPL (esp. ASCII escape codes / color)
- it persisted the "default" mode from pre-compilation to runtime,
causing #56073
With this PR, `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is the only flag that
we're agnostic about. It was added relatively recently (Windows 10
version 1511), and `libuv` has support to emulate its behavior when it's
not available natively. We query `libuv` directly to ask whether it is
expecting to emulate, rather than measuring the console mode at some
random point in time.
Otherwise this PR resets ENABLE_PROCESSED_OUTPUT and
ENABLE_WRAP_AT_EOL_OUTPUT always, since we output ASCII control
sequences unconditionally.
Resolves #56073.libuv for virtual terminal support (#57132)1 parent 67e992d commit e592169
1 file changed
+37
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
598 | 604 | | |
599 | 605 | | |
600 | 606 | | |
601 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
602 | 611 | | |
603 | 612 | | |
604 | 613 | | |
| |||
1676 | 1685 | | |
1677 | 1686 | | |
1678 | 1687 | | |
1679 | | - | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
1699 | 1708 | | |
1700 | | - | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
1701 | 1715 | | |
| 1716 | + | |
1702 | 1717 | | |
1703 | 1718 | | |
1704 | 1719 | | |
1705 | 1720 | | |
1706 | | - | |
1707 | 1721 | | |
1708 | 1722 | | |
1709 | 1723 | | |
| |||
0 commit comments