|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2003, 2012 Wind River Systems, Inc. and others. |
2 |
* Copyright (c) 2003, 2013 Wind River Systems, Inc. and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 18-23
Link Here
|
| 18 |
* Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED |
18 |
* Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED |
| 19 |
* Martin Oberhuber (Wind River) - [334969] Fix multi-command SGR sequence |
19 |
* Martin Oberhuber (Wind River) - [334969] Fix multi-command SGR sequence |
| 20 |
* Kris De Volder (VMWare) - [392107] Switched interpretation for ESC[0K and ESC[1K sequences |
20 |
* Kris De Volder (VMWare) - [392107] Switched interpretation for ESC[0K and ESC[1K sequences |
|
|
21 |
* Martin Oberhuber (Wind River) - [401386] Regression: No header on top due to incorrect ESC[K interpretation |
| 22 |
* Martin Oberhuber (Wind River) - [401480] Handle ESC[39;49m and ESC[G |
| 21 |
*******************************************************************************/ |
23 |
*******************************************************************************/ |
| 22 |
package org.eclipse.tm.internal.terminal.emulator; |
24 |
package org.eclipse.tm.internal.terminal.emulator; |
| 23 |
|
25 |
|
|
Lines 606-617
Link Here
|
| 606 |
* specified by the ANSI parameter (default is column 1). |
608 |
* specified by the ANSI parameter (default is column 1). |
| 607 |
*/ |
609 |
*/ |
| 608 |
private void processAnsiCommand_G() { |
610 |
private void processAnsiCommand_G() { |
| 609 |
int targetColumn = 1; |
611 |
moveCursor(relativeCursorLine(), getAnsiParameter(0) - 1); |
| 610 |
|
|
|
| 611 |
if (ansiParameters[0].length() > 0) |
| 612 |
targetColumn = getAnsiParameter(0) - 1; |
| 613 |
|
| 614 |
moveCursor(relativeCursorLine(), targetColumn); |
| 615 |
} |
612 |
} |
| 616 |
|
613 |
|
| 617 |
/** |
614 |
/** |
|
Lines 661-667
Link Here
|
| 661 |
* moving the cursor. |
658 |
* moving the cursor. |
| 662 |
*/ |
659 |
*/ |
| 663 |
private void processAnsiCommand_K() { |
660 |
private void processAnsiCommand_K() { |
| 664 |
int ansiParameter = getAnsiParameter(0); |
661 |
//Bug 401386: missing parameter must be interpreted as 0, and not 1 like most other defaults. |
|
|
662 |
int ansiParameter = 0; |
| 663 |
if (ansiParameters[0].length() > 0) |
| 664 |
ansiParameter = getAnsiParameter(0); |
| 665 |
|
665 |
|
| 666 |
switch (ansiParameter) { |
666 |
switch (ansiParameter) { |
| 667 |
case 0: |
667 |
case 0: |
|
Lines 797-802
Link Here
|
| 797 |
style = style.setForground("WHITE_FOREGROUND"); //$NON-NLS-1$ |
797 |
style = style.setForground("WHITE_FOREGROUND"); //$NON-NLS-1$ |
| 798 |
break; |
798 |
break; |
| 799 |
|
799 |
|
|
|
800 |
case 39: //Foreground: Default |
| 801 |
style = style.setForground(text.getDefaultStyle().getForground()); |
| 802 |
break; |
| 803 |
|
| 800 |
case 40: |
804 |
case 40: |
| 801 |
style = style.setBackground("BLACK"); //$NON-NLS-1$ |
805 |
style = style.setBackground("BLACK"); //$NON-NLS-1$ |
| 802 |
break; |
806 |
break; |
|
Lines 829-834
Link Here
|
| 829 |
style = style.setBackground("WHITE"); //$NON-NLS-1$ |
833 |
style = style.setBackground("WHITE"); //$NON-NLS-1$ |
| 830 |
break; |
834 |
break; |
| 831 |
|
835 |
|
|
|
836 |
case 49: //Background: Default |
| 837 |
style = style.setBackground(text.getDefaultStyle().getBackground()); |
| 838 |
break; |
| 839 |
|
| 832 |
default: |
840 |
default: |
| 833 |
Logger |
841 |
Logger |
| 834 |
.log("Unsupported graphics rendition parameter: " + ansiParameter); //$NON-NLS-1$ |
842 |
.log("Unsupported graphics rendition parameter: " + ansiParameter); //$NON-NLS-1$ |