mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +02:00
- Add some editor key combinations
- Improve saving performance
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user