Sfoglia il codice sorgente

Restore screen buffer and refresh screen using the SetContentsAsDirty method.

BDisp 1 anno fa
parent
commit
2608718980
1 ha cambiato i file con 13 aggiunte e 1 eliminazioni
  1. 13 1
      Terminal.Gui/ConsoleDrivers/NetDriver.cs

+ 13 - 1
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -865,8 +865,20 @@ internal class NetDriver : ConsoleDriver
         {
             Console.ResetColor ();
             Console.Clear ();
+
+            //Disable alternative screen buffer.
+            Console.Out.Write (EscSeqUtils.CSI_RestoreCursorAndRestoreAltBufferWithBackscroll);
+
+            //Set cursor key to cursor.
+            Console.Out.Write (EscSeqUtils.CSI_ShowCursor);
+
             Platform.Suspend ();
-            Application.Refresh ();
+
+            //Enable alternative screen buffer.
+            Console.Out.Write (EscSeqUtils.CSI_SaveCursorAndActivateAltBufferNoBackscroll);
+
+            SetContentsAsDirty ();
+            Refresh ();
         }
 
         StartReportingMouseMoves ();