xW: render leaked lines a bit more accurately
There is no need to reset all text attributes, just the colour.
This commit is contained in:
parent
34521e61c1
commit
e5156cddbf
14
xW/xW.cpp
14
xW/xW.cpp
|
@ -678,14 +678,12 @@ buffer_print_line(std::vector<BufferLine>::const_iterator begin,
|
||||||
if (!prefix.empty())
|
if (!prefix.empty())
|
||||||
richedit_replacesel(g.hwndBuffer, &pcf, prefix.c_str());
|
richedit_replacesel(g.hwndBuffer, &pcf, prefix.c_str());
|
||||||
|
|
||||||
std::wstring text;
|
for (auto it : line->items) {
|
||||||
for (const auto &it : line->items)
|
it.format.dwEffects &= ~CFE_AUTOCOLOR;
|
||||||
text += it.text;
|
it.format.crTextColor = GetSysColor(COLOR_GRAYTEXT);
|
||||||
|
it.format.dwEffects |= CFE_AUTOBACKCOLOR;
|
||||||
CHARFORMAT2 format = default_charformat();
|
richedit_replacesel(g.hwndBuffer, &it.format, it.text.c_str());
|
||||||
format.dwEffects &= ~CFE_AUTOCOLOR;
|
}
|
||||||
format.crTextColor = GetSysColor(COLOR_GRAYTEXT);
|
|
||||||
richedit_replacesel(g.hwndBuffer, &format, text.c_str());
|
|
||||||
} else {
|
} else {
|
||||||
if (!prefix.empty())
|
if (!prefix.empty())
|
||||||
richedit_replacesel(g.hwndBuffer, &pcf, prefix.c_str());
|
richedit_replacesel(g.hwndBuffer, &pcf, prefix.c_str());
|
||||||
|
|
Loading…
Reference in New Issue