1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 570588: Some Private CSI sequences are not correctly interpreted

CSI commands should be recognised as private if the first
character is one of <=>? and not only ?

Change-Id: Idca36ba4dc6bb1bcb3d10f921b2315876769ea5b
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
This commit is contained in:
Fabrizio Iannetti 2021-01-23 17:28:30 +01:00 committed by Jonah Graham
parent 28589d32a3
commit dabe283c27
3 changed files with 8 additions and 9 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.control; singleton:=true Bundle-SymbolicName: org.eclipse.tm.terminal.control; singleton:=true
Bundle-Version: 5.0.0.qualifier Bundle-Version: 5.0.100.qualifier
Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Bundle-Localization: plugin Bundle-Localization: plugin

View file

@ -1,5 +1,5 @@
############################################################################### ###############################################################################
# Copyright (c) 2018, 2020 Contributors to the Eclipse Foundation # Copyright (c) 2018, 2021 Contributors to the Eclipse Foundation
# #
# See the NOTICE file(s) distributed with this work for additional # See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
@ -24,7 +24,7 @@ blurb=TM Terminal Control\n\
Version: {featureVersion}\n\ Version: {featureVersion}\n\
Build id: {0}\n\ Build id: {0}\n\
\n\ \n\
Copyright (c) 2018, 2020 Contributors to the Eclipse Foundation Copyright (c) 2018, 2021 Contributors to the Eclipse Foundation
\n\ \n\
See the NOTICE file(s) distributed with this work for additional\n\ See the NOTICE file(s) distributed with this work for additional\n\
information regarding copyright ownership.\n\ information regarding copyright ownership.\n\

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2018 Wind River Systems, Inc. and others. * Copyright (c) 2003, 2021 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0 * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -403,7 +403,8 @@ public class VT100Emulator implements ControlListener {
break; break;
case ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND: case ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND:
if (character == '?') { // characters `<=>?` mark private commands
if (character >= '\u003c' && character <= '\u003f') {
ansiState = ANSISTATE_EXPECTING_DEC_PRIVATE_COMMAND; ansiState = ANSISTATE_EXPECTING_DEC_PRIVATE_COMMAND;
break; break;
} }
@ -411,8 +412,7 @@ public class VT100Emulator implements ControlListener {
// Parameters can appear after the '[' in an escape sequence, but they // Parameters can appear after the '[' in an escape sequence, but they
// are optional. // are optional.
if (character == '@' || (character >= 'A' && character <= 'Z') if (character >= '\u0040' && character < '\u007f') {
|| (character >= 'a' && character <= 'z')) {
ansiState = ANSISTATE_INITIAL; ansiState = ANSISTATE_INITIAL;
processAnsiCommandCharacter(character); processAnsiCommandCharacter(character);
} else { } else {
@ -435,8 +435,7 @@ public class VT100Emulator implements ControlListener {
// Parameters can appear after the '[?' in an escape sequence, but they // Parameters can appear after the '[?' in an escape sequence, but they
// are optional. // are optional.
if (character == '@' || (character >= 'A' && character <= 'Z') if (character >= '\u0040' && character < '\u007f') {
|| (character >= 'a' && character <= 'z')) {
ansiState = ANSISTATE_INITIAL; ansiState = ANSISTATE_INITIAL;
processDecPrivateCommandCharacter(character); processDecPrivateCommandCharacter(character);
} else { } else {