summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-07-21 20:41:53 +1000
committerMaxime Coste <mawww@kakoune.org>2021-07-12 10:25:59 +1000
commit44deaeb4ebe4ff459ba243bc9849ee320f2e800b (patch)
tree3d67a824fc0b2a65220a376d6a43d2c182b064ec
parent7bbc057cd7f299ab4568bb203bf47bbf97d6956a (diff)
Do not trust saved active face when force redrawing
-rw-r--r--src/terminal_ui.cc10
1 files 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<Change> changes{Change{}};
auto new_hashes = lines | transform([](auto& line) { return hash_value(line.atoms); }) | gather<Vector>();