From a2767269d0e8500b49088a472856e41cd6dee492 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Thu, 31 Aug 2023 01:11:01 -0500 Subject: [PATCH] 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. --- helix-tui/src/backend/crossterm.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs index d276dea0c..52841f6ef 100644 --- a/helix-tui/src/backend/crossterm.rs +++ b/helix-tui/src/backend/crossterm.rs @@ -328,6 +328,9 @@ fn queue(&self, mut w: W) -> io::Result<()> 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 @@ fn queue(&self, mut w: W) -> io::Result<()> if added.contains(Modifier::RAPID_BLINK) { queue!(w, SetAttribute(CAttribute::RapidBlink))?; } + if added.contains(Modifier::HIDDEN) { + queue!(w, SetAttribute(CAttribute::Hidden))?; + } Ok(()) }