From: Kevin Lamonte Date: Wed, 30 Oct 2019 18:03:50 +0000 (-0500) Subject: #58 detect iterm2 X-Git-Tag: fanfix-swing-0.0.1~12^2~13^2^2~46 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=854cad3bb9191bd48f71802f039fa482fc3960a8;p=fanfix-swing.git #58 detect iterm2 --- diff --git a/src/jexer/backend/ECMA48Terminal.java b/src/jexer/backend/ECMA48Terminal.java index 05c7575e..b45e8d41 100644 --- a/src/jexer/backend/ECMA48Terminal.java +++ b/src/jexer/backend/ECMA48Terminal.java @@ -1172,11 +1172,12 @@ public class ECMA48Terminal extends LogicalScreen // Enable mouse reporting and metaSendsEscape this.output.printf("%s%s", mouse(true), xtermMetaSendsEscape(true)); - this.output.flush(); // Request xterm use the sixel settings we want this.output.printf("%s", xtermSetSixelSettings()); + this.output.flush(); + // Query the screen size sessionInfo.queryWindowSize(); setDimensions(sessionInfo.getWindowWidth(), @@ -1264,11 +1265,12 @@ public class ECMA48Terminal extends LogicalScreen // Enable mouse reporting and metaSendsEscape this.output.printf("%s%s", mouse(true), xtermMetaSendsEscape(true)); - this.output.flush(); // Request xterm use the sixel settings we want this.output.printf("%s", xtermSetSixelSettings()); + this.output.flush(); + // Query the screen size sessionInfo.queryWindowSize(); setDimensions(sessionInfo.getWindowWidth(), @@ -2858,6 +2860,13 @@ public class ECMA48Terminal extends LogicalScreen } jexerImages = true; } + if (x.equals("1337")) { + // Terminal reports iTerm2 images support + if (debugToStderr) { + System.err.println("Device Attributes: iTerm2 images"); + } + iterm2Images = true; + } } if (jexerImages == false) { // Terminal does not support Jexer images, disable