mirror of
https://gitlab.com/AutumnMeowMeow/jexer
synced 2024-09-19 11:50:19 -06:00
also check for text cell size
This commit is contained in:
parent
842be156c1
commit
739ada621a
2 changed files with 25 additions and 1 deletions
|
@ -145,6 +145,7 @@ The table below lists terminals tested against Jexer's Xterm backend:
|
|||
| rxvt-unicode | X11 | yes | yes | no(2) |
|
||||
| xfce4-terminal | X11 | yes | yes | no |
|
||||
| kitty(3) | X11 | yes | yes | no |
|
||||
| mintty | Windows | yes | yes | no |
|
||||
| aminal(3) | X11 | yes | no | no |
|
||||
| konsole | X11 | yes | no | no |
|
||||
| yakuake | X11 | yes | no | no |
|
||||
|
|
|
@ -2760,6 +2760,27 @@ public class ECMA48Terminal extends LogicalScreen
|
|||
heightPixels = 400;
|
||||
}
|
||||
}
|
||||
if ((params.size() > 2) && (params.get(0).equals("6"))) {
|
||||
if (debugToStderr) {
|
||||
System.err.printf("windowOp text cell pixels: " +
|
||||
"height %s width %s\n",
|
||||
params.get(1), params.get(2));
|
||||
}
|
||||
try {
|
||||
widthPixels = width * Integer.parseInt(params.get(2));
|
||||
heightPixels = height * Integer.parseInt(params.get(1));
|
||||
} catch (NumberFormatException e) {
|
||||
if (debugToStderr) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (widthPixels <= 0) {
|
||||
widthPixels = 640;
|
||||
}
|
||||
if (heightPixels <= 0) {
|
||||
heightPixels = 400;
|
||||
}
|
||||
}
|
||||
resetParser();
|
||||
return;
|
||||
default:
|
||||
|
@ -2794,7 +2815,9 @@ public class ECMA48Terminal extends LogicalScreen
|
|||
* @return the string to emit to xterm
|
||||
*/
|
||||
private String xtermReportWindowPixelDimensions() {
|
||||
return "\033[14t";
|
||||
// We will ask for both window and text cell dimensions, and
|
||||
// hopefully one of them will work.
|
||||
return "\033[14t\033[16t";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue