Revert "Fixed render issue where writeline inside status caused corrupt output #415 #694"

This reverts commit 71a5d830671220e601e4e6ab4d4c352ae0e0a64a.

The commit introduced major flickering when working with LiveRenderables

Fixes #1466
This commit is contained in:
Phil Scott 2024-04-01 11:36:38 -04:00 committed by Patrik Svensson
parent 1a3249cdae
commit fc0b553a4a
4 changed files with 3 additions and 41 deletions

View File

@ -49,7 +49,7 @@ internal sealed class LiveRenderable : Renderable
}
var linesToMoveUp = _shape.Value.Height - 1;
return new ControlCode("\r" + (EL(2) + CUU(1)).Repeat(linesToMoveUp));
return new ControlCode("\r" + CUU(linesToMoveUp));
}
}

View File

@ -1,10 +1,10 @@
[?25l
* foo


- bar


* baz
[?25h

View File

@ -1,12 +0,0 @@
[?25l
⣷ long text that should not interfere writeline text
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxx
⣷ long text that should not interfere writeline text

⣷ long text that should not interfere writeline text
[?25h

View File

@ -48,30 +48,4 @@ public sealed class StatusTests
// Then
return Verifier.Verify(console.Output);
}
[Fact]
[Expectation("WriteLineOverflow")]
public Task Should_Render_Correctly_When_WriteLine_Exceeds_Console_Width()
{
// Given
var console = new TestConsole()
.Colors(ColorSystem.TrueColor)
.Width(100)
.Interactive()
.EmitAnsiSequences();
var status = new Status(console)
{
AutoRefresh = false,
};
// When
status.Start("long text that should not interfere writeline text", ctx =>
{
ctx.Refresh();
console.WriteLine("x".Repeat(console.Profile.Width + 10), new Style(foreground: Color.White));
});
// Then
return Verifier.Verify(console.Output);
}
}