kitty: update some comments #1998

pull/1978/head
nick black 3 years ago
parent 22cc2b1906
commit d25496220e
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -14,7 +14,8 @@
// (768pix * 4Bpp * 4/3 base64 overhead == 4096B).
//
// 0.20.0 introduced an animation protocol which drastically reduces the
// bandwidth necessary for wipe-and-rebuild. we thus have two strategies:
// bandwidth necessary for wipe-and-rebuild. 0.21.1 improved it further.
// we thus have three strategies:
//
// pre-0.20.0: keep an auxvec for each wiped cell, with a byte per pixel.
// on wipe, copy the alphas into the auxvec, and set them to 0 in the
@ -22,13 +23,17 @@
// operations require delicate edits directly to the encoded form. the
// graphic is updated by completely retransmitting it.
//
// 0.20.0+: we make a copy of the RGBA data, populating all auxvecs upon
// 0.20.0: we make a copy of the RGBA data, populating all auxvecs upon
// blit. to wipe, we generate a cell's woth of 0s, and merge them into
// the existing image. to rebuild, we merge the original data into the
// existing image. this cuts down on bandwidth--unchanged cells are not
// retransmitted. it does require a fairly expensive copy of the source,
// even though we might never use it.
//
// 0.21.1+: our auxvecs are now a single word -- the sprixcell state prior
// to annihilation. we never need retransmit the original RGBA on
// restore, as we can instead use composition with reflection.
//
// if a graphic needs be moved, we can move it with a control operation,
// rather than erasing it and redrawing it manually.
//

@ -346,8 +346,8 @@ grow_esc_table(tinfo* ti, const char* tstr, escape_e esc,
// thing is, if we get a response to this, we know we can use it for u7!
#define DSRCPR "\x1b[6n"
// check for Synchronized Update Mode support. the p is necessary, but Konsole
// doesn't consume it, so we have to handle that in our state machine =[.
// check for Synchronized Update Mode support. the p is necessary, but at
// least Konsole and Terminal.app fail to consume it =[.
#define SUMQUERY "\x1b[?2026$p"
// XTSMGRAPHICS query for the number of color registers.
@ -369,7 +369,7 @@ grow_esc_table(tinfo* ti, const char* tstr, escape_e esc,
PRIDEVATTR
// we send an XTSMGRAPHICS to set up 256 color registers (the most we can
// currently take advantage of; we need at least 64 to use sixel at all.
// currently take advantage of; we need at least 64 to use sixel at all).
// maybe that works, maybe it doesn't. then query both color registers
// and geometry. send XTGETTCAP for terminal name. if 'minimal' is set, don't
// send any identification queries (we've already identified the terminal).
@ -571,8 +571,8 @@ apply_term_heuristics(tinfo* ti, const char* termname, int fd,
return -1;
}
}
// we don't yet want to use the iterm2 protocol in place of sixel
//setup_iterm_bitmaps(ti, fd);
// wezterm supports iTerm2's graphic protocol, but we'd rather use Sixel.
// once it adds Kitty, we'll prefer that.
}else if(qterm == TERMINAL_XTERM){
termname = "XTerm";
// xterm 357 added color palette escapes XT{PUSH,POP,REPORT}COLORS
@ -663,13 +663,14 @@ build_supported_styles(tinfo* ti){
#ifdef __APPLE__
// Terminal.App is a wretched piece of shit that can't handle even the most
// basic of queries, instead bleeing them through to stdout like a great
// basic of queries, instead bleeding them through to stdout like a great
// wounded hippopotamus. it does export "TERM_PROGRAM=Apple_Terminal", becuase
// it is a committee on sewage and drainage where all the members have
// tourette's. on mac os, if TERM_PROGRAM=Apple_Terminal, accept this hideous
// existence, circumvent all queries, and may god have mercy on our souls.
// of course that means if a terminal launched from Terminal.App doesn't clear
// or reset this environment variable, they're cursed to live as Terminal.App.
// i'm likewise unsure what we're supposed to do should you ssh anywhere =[.
static queried_terminals_e
macos_early_matches(const char* termname){
(void)termname;

Loading…
Cancel
Save