Ver código fonte

Preventing future throw exceptions on "VT101 with No Options".

BDisp 3 anos atrás
pai
commit
1d0852f952
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      Terminal.Gui/ConsoleDrivers/NetDriver.cs

+ 6 - 2
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -471,10 +471,12 @@ namespace Terminal.Gui {
 				var c = kChar [i];
 				if (c == '[') {
 					foundPoint++;
-				} else if (foundPoint == 1 && c != ';') {
+				} else if (foundPoint == 1 && c != ';' && c != '?') {
 					value += c.ToString ();
+				} else if (c == '?') {
+					foundPoint++;
 				} else if (c == ';') {
-					if (foundPoint == 1) {
+					if (foundPoint >= 1) {
 						point.Y = int.Parse (value) - 1;
 					}
 					value = "";
@@ -500,6 +502,8 @@ namespace Terminal.Gui {
 							return;
 						}
 						break;
+					case 'c': // CSI?1;0c ("VT101 with No Options")
+						break;
 					default:
 						throw new NotImplementedException ();
 					}