From 44deaeb4ebe4ff459ba243bc9849ee320f2e800b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 21 Jul 2020 20:41:53 +1000 Subject: [PATCH] Do not trust saved active face when force redrawing --- src/terminal_ui.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/terminal_ui.cc b/src/terminal_ui.cc index 795e42d2..9ace18d8 100644 --- a/src/terminal_ui.cc +++ b/src/terminal_ui.cc @@ -231,12 +231,16 @@ void TerminalUI::Screen::output(bool force) if (lines.empty()) return; - if (force) - hashes.clear(); - // iTerm2 "begin synchronised update" sequence printf("\033P=1s\033\\"); + if (force) + { + hashes.clear(); + printf("\033[m"); + m_active_face = Face{}; + } + struct Change { int keep; int add; int del; }; Vector changes{Change{}}; auto new_hashes = lines | transform([](auto& line) { return hash_value(line.atoms); }) | gather();