From 560441f644007c43da4315422b9072791887334f Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 30 Aug 2023 13:56:18 -0500 Subject: [PATCH] crossterm: Handle 'hidden' modifier 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 d276dea0ceb6..52841f6ef9cc 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(()) }