diff --git a/src/Spectre.Console/Live/LiveRenderable.cs b/src/Spectre.Console/Live/LiveRenderable.cs index a681d2405..40107f9cd 100644 --- a/src/Spectre.Console/Live/LiveRenderable.cs +++ b/src/Spectre.Console/Live/LiveRenderable.cs @@ -49,7 +49,7 @@ public IRenderable PositionCursor() } var linesToMoveUp = _shape.Value.Height - 1; - return new ControlCode("\r" + (EL(2) + CUU(1)).Repeat(linesToMoveUp)); + return new ControlCode("\r" + CUU(linesToMoveUp)); } } diff --git a/test/Spectre.Console.Tests/Expectations/Live/Status/Render.Output.verified.txt b/test/Spectre.Console.Tests/Expectations/Live/Status/Render.Output.verified.txt index cd5fed942..debe2399d 100644 --- a/test/Spectre.Console.Tests/Expectations/Live/Status/Render.Output.verified.txt +++ b/test/Spectre.Console.Tests/Expectations/Live/Status/Render.Output.verified.txt @@ -1,10 +1,10 @@ [?25l * foo - + - bar - + * baz [?25h \ No newline at end of file diff --git a/test/Spectre.Console.Tests/Expectations/Live/Status/WriteLineOverflow.Output.verified.txt b/test/Spectre.Console.Tests/Expectations/Live/Status/WriteLineOverflow.Output.verified.txt deleted file mode 100644 index d3647bb50..000000000 --- a/test/Spectre.Console.Tests/Expectations/Live/Status/WriteLineOverflow.Output.verified.txt +++ /dev/null @@ -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 \ No newline at end of file diff --git a/test/Spectre.Console.Tests/Unit/Live/StatusTests.cs b/test/Spectre.Console.Tests/Unit/Live/StatusTests.cs index b80c5d0d1..a9510ad89 100644 --- a/test/Spectre.Console.Tests/Unit/Live/StatusTests.cs +++ b/test/Spectre.Console.Tests/Unit/Live/StatusTests.cs @@ -48,30 +48,4 @@ public Task Should_Render_Status_Correctly() // 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); - } }