mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(tui): enable Kitty images for Rex
This commit is contained in:
parent
fdce48eb40
commit
396ecd7b8f
2 changed files with 4 additions and 4 deletions
|
|
@ -92,10 +92,10 @@ function detectCapabilitiesFromEnvironment(tmuxForwardsHyperlink: () => boolean)
|
|||
return { images: "kitty", trueColor: hasTrueColorHint, hyperlinks: true };
|
||||
}
|
||||
|
||||
// Rex supports OSC 8 hyperlinks but only partially implements the Kitty graphics protocol
|
||||
// (no Unicode placeholders), so leave images off. Check it before outer-terminal detection.
|
||||
// Rex supports OSC 8 hyperlinks and only partially implements the Kitty graphics protocol
|
||||
// (no Unicode placeholders), but enough to support Pi.
|
||||
if (termProgram === "rex") {
|
||||
return { images: null, trueColor: true, hyperlinks: true };
|
||||
return { images: "kitty", trueColor: true, hyperlinks: true };
|
||||
}
|
||||
|
||||
if (process.env.KITTY_WINDOW_ID || termProgram === "kitty") {
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ describe("detectCapabilities", () => {
|
|||
withEnv({ TERM_PROGRAM: "rex", TERM: "xterm-256color", KITTY_WINDOW_ID: "1" }, () => {
|
||||
const caps = detectCapabilities();
|
||||
assert.strictEqual(caps.hyperlinks, true);
|
||||
assert.strictEqual(caps.images, null);
|
||||
assert.strictEqual(caps.images, "kitty");
|
||||
assert.strictEqual(caps.trueColor, true);
|
||||
});
|
||||
withEnv({ TERM_PROGRAM: "rex", PI_HYPERLINKS: "0" }, () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue