From 70741d4f80ab2ec9e99d8e937868ec06ea9fa8e7 Mon Sep 17 00:00:00 2001 From: Mark Thomas Date: Sun, 2 Jun 2019 21:29:12 +0100 Subject: [PATCH] set underline and blink in fallback path pull/29 inadvertently removed the fallback path for setting single underline and slow blink. Restore it. --- termwiz/src/render/terminfo.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/termwiz/src/render/terminfo.rs b/termwiz/src/render/terminfo.rs index c5ac8fa8f..1b8b44fe0 100644 --- a/termwiz/src/render/terminfo.rs +++ b/termwiz/src/render/terminfo.rs @@ -47,6 +47,7 @@ impl TerminfoRenderer { }); } + #[cfg_attr(feature = "cargo-clippy", allow(clippy::cognitive_complexity))] fn flush_pending_attr(&mut self, out: &mut W) -> Fallible<()> { macro_rules! attr_on { ($cap:ident, $sgr:expr) => { @@ -89,6 +90,14 @@ impl TerminfoRenderer { _ => {} } + if attr.underline() == Underline::Single { + attr_on!(Sgr::Underline(Underline::Single)); + } + + if attr.blink() == Blink::Slow { + attr_on!(Sgr::Blink(Blink::Slow)); + } + if attr.reverse() { attr_on!(EnterReverseMode, Sgr::Inverse(true)); }