|
@@ -37,6 +37,7 @@ internal class WindowsConsole
|
|
|
private CursorVisibility? _currentCursorVisibility;
|
|
|
private CursorVisibility? _pendingCursorVisibility;
|
|
|
private readonly StringBuilder _stringBuilder = new (256 * 1024);
|
|
|
+ private string _lastWrite = string.Empty;
|
|
|
|
|
|
public WindowsConsole ()
|
|
|
{
|
|
@@ -116,7 +117,24 @@ internal class WindowsConsole
|
|
|
|
|
|
var s = _stringBuilder.ToString ();
|
|
|
|
|
|
+ // TODO: requires extensive testing if we go down this route
|
|
|
+ // If console output has changed
|
|
|
+ if (s != _lastWrite)
|
|
|
+ {
|
|
|
+ // supply console with the new content
|
|
|
+ result = WriteConsole (_screenBuffer, s, (uint)s.Length, out uint _, nint.Zero);
|
|
|
+ }
|
|
|
+
|
|
|
result = WriteConsole (_screenBuffer, s, (uint)s.Length, out uint _, nint.Zero);
|
|
|
+
|
|
|
+ _lastWrite = s;
|
|
|
+
|
|
|
+ foreach (var sixel in Application.Sixel)
|
|
|
+ {
|
|
|
+ SetCursorPosition (new Coord ((short)sixel.ScreenPosition.X, (short)sixel.ScreenPosition.Y));
|
|
|
+ WriteConsole (_screenBuffer, sixel.SixelData, (uint)sixel.SixelData.Length, out uint _, nint.Zero);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (!result)
|