- Add some editor key combinations

- Improve saving performance
This commit is contained in:
Stone-Red-Code
2021-10-11 20:00:13 +02:00
parent 8b21c99f54
commit ae27262a51
2 changed files with 24 additions and 13 deletions
+17
View File
@@ -25,6 +25,21 @@ namespace YesNt.CodeEditor
textEditor.EditMode = Mode.Command;
break;
case ConsoleKey.B:
int position = textEditor.Lines.Count;
textEditor.CursorPosition.Y = position - 1;
textEditor.LineOffset = Math.Max(position - Console.WindowHeight + 3, 0);
textEditor.Display(true);
break;
case ConsoleKey.T:
textEditor.CursorPosition.Y = 0;
textEditor.LineOffset = 0;
textEditor.Display(true);
break;
case ConsoleKey.S:
textEditor.CursorPosition.X = 0;
break;
@@ -172,6 +187,8 @@ namespace YesNt.CodeEditor
string command = input.Split(' ')[0].Trim();
string path;
Console.CursorVisible = false;
switch (command)
{
case "edit":