git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cache glyphs, fix vttest test
[nikiroo-utils.git]
/
src
/
jexer
/
tterminal
/
ECMA48.java
diff --git
a/src/jexer/tterminal/ECMA48.java
b/src/jexer/tterminal/ECMA48.java
index 7869829753df190c64306b51583731f3d812faec..f657eaffa1255bdf0ee5a391ca0cfcdaaec0aa0f 100644
(file)
--- a/
src/jexer/tterminal/ECMA48.java
+++ b/
src/jexer/tterminal/ECMA48.java
@@
-129,15
+129,13
@@
public class ECMA48 implements Runnable {
return "\033[?6c";
case VT220:
return "\033[?6c";
case VT220:
+ case XTERM:
// "I am a VT220" - 7 bit version
if (!s8c1t) {
return "\033[?62;1;6c";
}
// "I am a VT220" - 8 bit version
return "\u009b?62;1;6c";
// "I am a VT220" - 7 bit version
if (!s8c1t) {
return "\033[?62;1;6c";
}
// "I am a VT220" - 8 bit version
return "\u009b?62;1;6c";
- case XTERM:
- // "I am a VT100 with advanced video option" (often VT102)
- return "\033[?1;2c";
default:
throw new IllegalArgumentException("Invalid device type: " + type);
}
default:
throw new IllegalArgumentException("Invalid device type: " + type);
}
@@
-3760,6
+3758,7
@@
public class ECMA48 implements Runnable {
*/
private void dsr() {
boolean decPrivateModeFlag = false;
*/
private void dsr() {
boolean decPrivateModeFlag = false;
+ int row = currentState.cursorY;
for (int i = 0; i < collectBuffer.length(); i++) {
if (collectBuffer.charAt(i) == '?') {
for (int i = 0; i < collectBuffer.length(); i++) {
if (collectBuffer.charAt(i) == '?') {
@@
-3787,15
+3786,18
@@
public class ECMA48 implements Runnable {
case 6:
// Request cursor position. Respond with current position.
case 6:
// Request cursor position. Respond with current position.
+ if (currentState.originMode == true) {
+ row -= scrollRegionTop;
+ }
String str = "";
if (((type == DeviceType.VT220) || (type == DeviceType.XTERM))
&& (s8c1t == true)
) {
String str = "";
if (((type == DeviceType.VT220) || (type == DeviceType.XTERM))
&& (s8c1t == true)
) {
- str = String.format("\u009b%d;%dR",
- currentState.cursor
Y + 1, currentState.cursor
X + 1);
+ str = String.format("\u009b%d;%dR",
row + 1,
+ currentState.cursorX + 1);
} else {
} else {
- str = String.format("\033[%d;%dR",
- currentState.cursor
Y + 1, currentState.cursor
X + 1);
+ str = String.format("\033[%d;%dR",
row + 1,
+ currentState.cursorX + 1);
}
// Send string directly to remote side
}
// Send string directly to remote side