mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-01 01:25:27 +08:00 
			
		
		
		
	This reverts commit 71a5d83067.
The commit introduced major flickering when working with LiveRenderables
Fixes #1466
			
			
This commit is contained in:
		 Phil Scott
					Phil Scott
				
			
				
					committed by
					
						 Patrik Svensson
						Patrik Svensson
					
				
			
			
				
	
			
			
			 Patrik Svensson
						Patrik Svensson
					
				
			
						parent
						
							1a3249cdae
						
					
				
				
					commit
					fc0b553a4a
				
			| @@ -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)); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| [?25l      | ||||
| [38;5;11m*[0m foo | ||||
|       | ||||
| [2K[1A[2K[1A      | ||||
| [2A      | ||||
| [38;5;11m-[0m bar | ||||
|       | ||||
| [2K[1A[2K[1A      | ||||
| [2A      | ||||
| [38;5;11m*[0m baz | ||||
|       | ||||
| [2K[1A[2K[1A[2K[?25h | ||||
| @@ -1,12 +0,0 @@ | ||||
| [?25l                                                     | ||||
| [38;5;11m⣷[0m long text that should not interfere writeline text | ||||
|                                                      | ||||
| [2K[1A[2K[1A[38;5;15mxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[0m | ||||
| [38;5;15mxxxxxxxxxx[0m | ||||
|                                                      | ||||
| [38;5;11m⣷[0m long text that should not interfere writeline text | ||||
|                                                      | ||||
| [2K[1A[2K[1A                                                     | ||||
| [38;5;11m⣷[0m long text that should not interfere writeline text | ||||
|                                                      | ||||
| [2K[1A[2K[1A[2K[?25h | ||||
| @@ -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); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user