mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 02:46:17 +04:00
crossterm: Handle 'hidden' modifier (#8120)
Crossterm supports the 'hidden' SGR parameter but we previously didn't set the attribute when the "hidden" modifier was specified in a theme.
This commit is contained in:
parent
6bef982f2d
commit
a2767269d0
@ -328,6 +328,9 @@ fn queue<W>(&self, mut w: W) -> io::Result<()>
|
|||||||
if removed.contains(Modifier::SLOW_BLINK) || removed.contains(Modifier::RAPID_BLINK) {
|
if removed.contains(Modifier::SLOW_BLINK) || removed.contains(Modifier::RAPID_BLINK) {
|
||||||
queue!(w, SetAttribute(CAttribute::NoBlink))?;
|
queue!(w, SetAttribute(CAttribute::NoBlink))?;
|
||||||
}
|
}
|
||||||
|
if removed.contains(Modifier::HIDDEN) {
|
||||||
|
queue!(w, SetAttribute(CAttribute::NoHidden))?;
|
||||||
|
}
|
||||||
|
|
||||||
let added = self.to - self.from;
|
let added = self.to - self.from;
|
||||||
if added.contains(Modifier::REVERSED) {
|
if added.contains(Modifier::REVERSED) {
|
||||||
@ -351,6 +354,9 @@ fn queue<W>(&self, mut w: W) -> io::Result<()>
|
|||||||
if added.contains(Modifier::RAPID_BLINK) {
|
if added.contains(Modifier::RAPID_BLINK) {
|
||||||
queue!(w, SetAttribute(CAttribute::RapidBlink))?;
|
queue!(w, SetAttribute(CAttribute::RapidBlink))?;
|
||||||
}
|
}
|
||||||
|
if added.contains(Modifier::HIDDEN) {
|
||||||
|
queue!(w, SetAttribute(CAttribute::Hidden))?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user