From 04ce34c09976bb3d28c6bc88db7a3bdc50bd543c Mon Sep 17 00:00:00 2001 From: FloppyDiskDrive Date: Tue, 21 Nov 2017 17:47:37 -0600 Subject: yay mostly working terminal --- ShiftOS.Main/ShiftOS/Apps/Terminal.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ShiftOS.Main/ShiftOS/Apps/Terminal.cs') diff --git a/ShiftOS.Main/ShiftOS/Apps/Terminal.cs b/ShiftOS.Main/ShiftOS/Apps/Terminal.cs index 28e301c..44452ab 100644 --- a/ShiftOS.Main/ShiftOS/Apps/Terminal.cs +++ b/ShiftOS.Main/ShiftOS/Apps/Terminal.cs @@ -2,6 +2,8 @@ using System.Windows.Forms; using ShiftOS.Engine; using ShiftOS.Main.Terminal; +using System.Linq; +using System.Collections.Generic; namespace ShiftOS.Main.ShiftOS.Apps { @@ -14,6 +16,7 @@ namespace ShiftOS.Main.ShiftOS.Apps public bool RunningCommand = false; public bool WaitingResponse = false; public string InputReturnText = ""; + public List c = TerminalBackend.commandBuffer; // The below variables makes the terminal... a terminal! string OldText = ""; @@ -127,6 +130,11 @@ namespace ShiftOS.Main.ShiftOS.Apps Print(); e.Handled = true; } - } + else if (e.KeyCode == Keys.Up) + { + if (c.Count == 0) return; + termmain.AppendText(c.Last()); + } + } } } -- cgit v1.2.3