Make word jumps more consistent
This commit is contained in:
parent
f25c054b48
commit
dd4d4fbd95
|
@ -283,6 +283,8 @@ public static class tgcli {
|
|||
|
||||
var part1 = currentInputLine[..currentInputPos];
|
||||
var lastIndex = part1.TrimEnd().LastIndexOf(" ", StringComparison.Ordinal);
|
||||
if (lastIndex > 0)
|
||||
lastIndex++;
|
||||
if (lastIndex < 0)
|
||||
lastIndex = 0;
|
||||
currentInputPos = lastIndex;
|
||||
|
@ -294,7 +296,7 @@ public static class tgcli {
|
|||
break;
|
||||
|
||||
var index = currentInputLine.IndexOf(" ", currentInputPos + 1, StringComparison.Ordinal);
|
||||
currentInputPos = index + 1;
|
||||
currentInputPos = index;
|
||||
if (index < 0)
|
||||
currentInputPos = currentInputLine.Length;
|
||||
ScreenUpdate();
|
||||
|
|
Loading…
Reference in a new issue