mirror of
https://github.com/wez/wezterm.git
synced 2024-11-28 09:12:19 +03:00
98f35bbf24
This commit refines bidi property handling: * experimental_bidi has been split into two new configuration settings; `bidi_enabled` (which controls whether the terminal performs implicit bidi processing) and `bidi_direction` which specifies the base direction and whether auto detection is enabled. * The `Line` type can now store those bidi properties (they are actually split across 3 bits representing enabled, auto-detection and direction) * The terminal now has a concept of active bidi properties and default bidi properties * The default properties are pulled from the wezterm configuration * active bidi properties are potentially set via escape sequences, BDSM (which sets bidi_enabled) and SCP (which sets bidi_direction). We don't support the 2501 temporary dec private mode suggested by the BIDI recommendation doc at this time. * When creating new `Line`'s or clearing from the start of a `Line`, the effective bidi properties are computed (from the active props, falling back to default propr) and applied to the `Line`. * When rendering the line, we now look at its bidi properties instead of just the global config. The default bidi properties are `bidi_enabled: false` and `bidi_direction: LeftToRight` which corresponds to the typical bidi-unaware mode of most terminals. It is possible to live reload the config to change the effective defaults, but note that they apply, by design, to new lines being processed through the terminal. That means existing output is left unaffected by a config reload, but subsequently printed lines will respect it. Pressing CTRL-L or otherwise contriving to have the running application refresh its display should cause the refreshed display to update and apply the new bidi mode. refs: #784 |
||
---|---|---|
.. | ||
data | ||
examples | ||
src | ||
Cargo.toml | ||
LICENSE.md | ||
README.md |
Terminal Wizardry
This is a rust crate that provides a number of support functions for applications interested in either displaying data to a terminal or in building a terminal emulator.
It is currently in active development and subject to fairly wild sweeping changes.
Included functionality:
Surface
models a terminal display and its componentCell
s- Terminal attributes are aware of modern features such as True Color, Hyperlinks and will also support sixel and iterm style terminal graphics display.
Surface
s include a log ofChange
s and an API for consuming and applying deltas. This is a powerful building block for synchronizing screen instances.- Escape sequence parser decodes inscrutable escape sequences and gives them semantic meaning, making the code that uses them clearer. The decoded escapes can be re-encoded, allowing applications to start with the semantic meaning and emit the appropriate escape sequence without embedding obscure binary bytes.
Capabilities
allows probing for terminal capabilities that may not be included in the system terminfo database, and overriding them in an embedding application.Terminal
trait provides an abstraction over unix style ttys and Windows style console APIs.Change
s fromSurface
can be rendered toTerminal
s.Terminal
s allow decoding mouse and keyboard inputs in both blocking or non-blocking mode.Widget
trait allows composition of UI elements at a higher level.LineEditor
implements shell-like line editing functionality.
Windows Support
Termwiz understands how to work with both the legacy console APIs and the new PTY and virtual terminal features available in Windows 10, allowing for true color terminal applications on Windows 10.