Do not trust saved active face when force redrawing

This commit is contained in:
Maxime Coste 2020-07-21 20:41:53 +10:00
parent 7bbc057cd7
commit 44deaeb4eb

View File

@ -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>();