-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support terminal-wg's BiDi draft proposal in alacritty_terminal #7872
base: master
Are you sure you want to change the base?
Conversation
Seems like there's no performance impact, it's possible that the u8 fits inside the existing cell's padding though I'm too lazy to do the math. That said I still think it would be better stored in the extra data if this ever goes anywhere. |
Yeah, I benched Does perfbot bench with I will add some tests next. Is anything else required of me? |
It does not, good point. I've temporarily enabled it as a default feature for testing. |
@@ -2082,6 +2193,15 @@ impl<T: EventListener> Handler for Term<T> { | |||
let mode = match mode { | |||
ansi::Mode::Named(mode) => mode, | |||
ansi::Mode::Unknown(mode) => { | |||
#[cfg(feature = "bidi_draft")] | |||
// BDSM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BI-DIRECTIONAL SUPPORT MODE
https://terminal-wg.pages.freedesktop.org/bidi Implementation is hidden behind a `bidi_draft` crate feature, and depends on alacritty/vte#112. Public API is limited to: * `Cell::bidi_mode()` method which returns a `BidiMode` enum value. * `Cell::bidi_box_mirroring()` method which returns a boolean. * `Term` boolean field `bidi_disable_arrow_key_swapping`. Cell `BidiFlags` is only used internally since relations/interactions between individual flags are not straight forward, and could lead to erroneous behavior if it's all left for API consumers to figure out. `BidiDir` named fields exist in all `BidiMode` variants. This is done deliberately (instead of e.g. a `BidiMode` struct with a `BidiDir` field) to signify the different purpose `BidiDir` serves in each mode. Signed-off-by: Mohammad AlSaleh <[email protected]>
@MoSal Are you still interested in this? I'm definitely happy to collaborate if that avoids fragmentation between |
https://terminal-wg.pages.freedesktop.org/bidi
Implementation is hidden behind a
bidi_draft
crate feature, and depends on alacritty/vte#112.Public API is limited to:
Cell::bidi_mode()
method which returns aBidiMode
enum value.Cell::bidi_box_mirroring()
method which returns a boolean.Term
boolean fieldbidi_disable_arrow_key_swapping
.Cell
BidiFlags
is only used internally since relations/interactions between individual flags are not straight forward, and could lead to erroneous behavior if it's all left for API consumers to figure out.BidiDir
named fields exist in allBidiMode
variants. This is done deliberately (instead of e.g. aBidiMode
struct with aBidiDir
field) to signify the different purposeBidiDir
serves in each mode.