add word delete

This commit is contained in:
Laura Hausmann 2019-12-10 10:30:04 +01:00
parent c55ad6a8dc
commit 0089fd7075
Signed by: zotan
GPG key ID: 5EC1D38FFC321311
2 changed files with 13 additions and 1 deletions

View file

@ -22,6 +22,7 @@
<setting file="file://$PROJECT_DIR$/telegram/telegram.csproj" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/telegram/Command.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/tdsharp/TDLib.Api/Functions/SendMessage.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/869E6C21-96FE-460F-9B92-1C6D00DF784B/77/eec472f2/String.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/869E6C21-96FE-460F-9B92-1C6D00DF784B/3c/21f729b1/DateTime.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/7B2C2408-23DE-40E4-9D78-A7E306473419/4d/08bd0708/ConsoleKey.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/tdsharp/TDLib.Api/Functions/GetChats.cs" root0="SKIP_HIGHLIGHTING" />
@ -119,7 +120,7 @@
<workItem from="1575536428992" duration="12000" />
<workItem from="1575536474314" duration="39215000" />
<workItem from="1575724030612" duration="6335000" />
<workItem from="1575806456895" duration="27135000" />
<workItem from="1575806456895" duration="27705000" />
</task>
<servers />
</component>

View file

@ -289,6 +289,17 @@ namespace telegram
ScreenUpdate();
break;
case ConsoleKey.Backspace when currentInputLine.Length >= 1:
if (key.Modifiers.HasFlag(ConsoleModifiers.Alt))
{
var lastIndex = currentInputLine.TrimEnd().LastIndexOf(" ", StringComparison.Ordinal);
if (lastIndex < 0)
lastIndex = 0;
currentInputLine = currentInputLine.Substring(0, lastIndex);
if (lastIndex != 0)
currentInputLine += " ";
ScreenUpdate();
return;
}
currentInputLine = currentInputLine.Substring(0, currentInputLine.Length - 1);
ScreenUpdate();
break;