From 898428367a1e5befadaac8cbeae3c515f98868fb Mon Sep 17 00:00:00 2001 From: achi Date: Wed, 27 Nov 2019 10:44:40 +1000 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D1=81=D0=BB=D1=83=D1=87=D0=B0=D0=B5=20=D0=B5=D1=81?= =?UTF-8?q?=D0=BB=D0=B8=20=D0=BF=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BA=D1=83=D1=80=D1=81=D0=BE=D1=80=D0=B0=20=D0=BE=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=D0=B0=D0=BB=D0=B0=D1=81=D1=8C=20=D0=B2=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B0=D0=B5=D0=BC?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LERSU-8355 --- VKT5_RemoteConsole/Vkt5ConsoleControl.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/VKT5_RemoteConsole/Vkt5ConsoleControl.cs b/VKT5_RemoteConsole/Vkt5ConsoleControl.cs index efbaad5..9965be5 100644 --- a/VKT5_RemoteConsole/Vkt5ConsoleControl.cs +++ b/VKT5_RemoteConsole/Vkt5ConsoleControl.cs @@ -337,10 +337,11 @@ namespace Vkt5_RemoteConsole string showLine = this.displayLine; - if (this.displayCursor) + if (showLine.Length > 0 && cursorPos < showLine.Length && this.displayCursor) { - showLine = showLine.Remove(this.cursorPos, 1); - showLine = showLine.Insert(this.cursorPos, cursorChar); + showLine = showLine + .Remove(this.cursorPos, 1) + .Insert(this.cursorPos, cursorChar); } this.txtLine1.Text = showLine.Substring(0, 16); @@ -379,4 +380,4 @@ namespace Vkt5_RemoteConsole private bool isMenuBtnDown = false; private DateTime menuBtnPressTime = DateTime.MinValue; } -} +} \ No newline at end of file