disable newlines, fix alt+delete
This commit is contained in:
parent
893534935f
commit
91fd81e643
|
@ -416,12 +416,12 @@ namespace telegram {
|
|||
|
||||
public static void RemoveFromInputLineForward(bool word = false) {
|
||||
var part1 = currentInputLine.Substring(0, currentInputPos);
|
||||
var part2 = currentInputLine.Substring(currentInputPos);
|
||||
var part2 = currentInputLine.Substring(currentInputPos).TrimStart();
|
||||
if (word) {
|
||||
var index = part2.IndexOf(" ", StringComparison.Ordinal);
|
||||
if (index < 0)
|
||||
index = part2.Length - 1;
|
||||
part2 = part2.Substring(0, index);
|
||||
part2 = part2.Substring(index + 1);
|
||||
if (index != 0)
|
||||
part2 = " " + part2;
|
||||
//if (part2.StartsWith("⏎"))
|
||||
|
|
|
@ -240,7 +240,6 @@ namespace telegram {
|
|||
break;
|
||||
case ConsoleKey.Delete when currentInputLine.Length >= 1 && currentInputPos < currentInputLine.Length:
|
||||
if (key.Modifiers.HasFlag(ConsoleModifiers.Alt)) {
|
||||
RemoveFromInputLineForward(true);
|
||||
ScreenUpdate();
|
||||
return;
|
||||
}
|
||||
|
@ -285,10 +284,10 @@ namespace telegram {
|
|||
case ConsoleKey.DownArrow: break;
|
||||
default: {
|
||||
switch (key.Key) {
|
||||
case ConsoleKey.N when key.Modifiers.HasFlag(ConsoleModifiers.Control):
|
||||
InsertToInputLine("⏎ ");
|
||||
ScreenUpdate();
|
||||
return;
|
||||
//case ConsoleKey.N when key.Modifiers.HasFlag(ConsoleModifiers.Control):
|
||||
// InsertToInputLine("⏎ ");
|
||||
// ScreenUpdate();
|
||||
// return;
|
||||
case ConsoleKey.D when key.Modifiers.HasFlag(ConsoleModifiers.Control):
|
||||
HandleCommand(currentChatId == 0 ? "q" : "c");
|
||||
ScreenUpdate();
|
||||
|
|
Loading…
Reference in a new issue