diff options
author | Michael Davis | 2023-08-31 06:11:01 +0000 |
---|---|---|
committer | GitHub | 2023-08-31 06:11:01 +0000 |
commit | a2767269d0e8500b49088a472856e41cd6dee492 (patch) | |
tree | 6b91db270210d48af77a178c1c2f81f1a8796519 /helix-tui | |
parent | 6bef982f2d259cdecb8e249cf1ec4d5e20bb8b38 (diff) |
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.
Diffstat (limited to 'helix-tui')
-rw-r--r-- | helix-tui/src/backend/crossterm.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs index d276dea0..52841f6e 100644 --- a/helix-tui/src/backend/crossterm.rs +++ b/helix-tui/src/backend/crossterm.rs @@ -328,6 +328,9 @@ impl ModifierDiff { if removed.contains(Modifier::SLOW_BLINK) || removed.contains(Modifier::RAPID_BLINK) { queue!(w, SetAttribute(CAttribute::NoBlink))?; } + if removed.contains(Modifier::HIDDEN) { + queue!(w, SetAttribute(CAttribute::NoHidden))?; + } let added = self.to - self.from; if added.contains(Modifier::REVERSED) { @@ -351,6 +354,9 @@ impl ModifierDiff { if added.contains(Modifier::RAPID_BLINK) { queue!(w, SetAttribute(CAttribute::RapidBlink))?; } + if added.contains(Modifier::HIDDEN) { + queue!(w, SetAttribute(CAttribute::Hidden))?; + } Ok(()) } |