mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-23 03:10:01 +08:00
reset pixel style for newline (#54)
This commit is contained in:
parent
5d140845ee
commit
cfd0981a58
@ -153,10 +153,13 @@ std::string Screen::ToString() {
|
||||
std::wstringstream ss;
|
||||
|
||||
Pixel previous_pixel;
|
||||
Pixel final_pixel;
|
||||
|
||||
for (int y = 0; y < dimy_; ++y) {
|
||||
if (y != 0)
|
||||
if (y != 0) {
|
||||
UpdatePixelStyle(ss, previous_pixel, final_pixel);
|
||||
ss << '\n';
|
||||
}
|
||||
for (int x = 0; x < dimx_;) {
|
||||
auto& pixel = pixels_[y][x];
|
||||
wchar_t c = pixel.character;
|
||||
@ -166,7 +169,6 @@ std::string Screen::ToString() {
|
||||
}
|
||||
}
|
||||
|
||||
Pixel final_pixel;
|
||||
UpdatePixelStyle(ss, previous_pixel, final_pixel);
|
||||
|
||||
return to_string(ss.str());
|
||||
|
Loading…
Reference in New Issue
Block a user