Lock input line to bottom of terminal
This commit is contained in:
parent
f3372f39e4
commit
60ad19e914
|
@ -482,6 +482,8 @@ public class ClearCommand : Command {
|
|||
public override void Handler(List<string> inputParams) {
|
||||
lock (@lock) {
|
||||
Console.Clear();
|
||||
if (lockInputToBottom)
|
||||
Console.SetCursorPosition(0, Console.LargestWindowHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,8 +26,9 @@ namespace tgcli;
|
|||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static class tgcli {
|
||||
public static volatile Td.TdClient client = new();
|
||||
public static string dbdir = "";
|
||||
public const bool lockInputToBottom = true;
|
||||
public static volatile Td.TdClient client = new();
|
||||
public static string dbdir = "";
|
||||
public static volatile bool authorized;
|
||||
public static volatile string connectionState = "Connecting";
|
||||
public static long currentChatId = 0;
|
||||
|
@ -67,6 +68,8 @@ public static class tgcli {
|
|||
Thread.Sleep(1);
|
||||
}
|
||||
|
||||
if (lockInputToBottom)
|
||||
Console.SetCursorPosition(0, Console.LargestWindowHeight);
|
||||
ScreenUpdate();
|
||||
while (!quitting)
|
||||
MainLoop();
|
||||
|
|
Loading…
Reference in a new issue