manually add u7 on kitty if missing, sigh #1816

pull/1825/head
nick black 3 years ago
parent 383678da4e
commit 8ff8368fe1
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -163,6 +163,19 @@ init_terminfo_esc(tinfo* ti, const char* name, escape_e idx,
return 0;
}
// older kitty terminfo doesn't include u7. remove this when we can FIXME.
static int
add_u7_escape(tinfo* ti, size_t* tablelen, size_t* tableused){
const char* u7 = get_escape(ti, ESCAPE_DSRCPR);
if(u7){
return 0; // already present
}
if(grow_esc_table(ti, "\e[6n", ESCAPE_DSRCPR, tablelen, tableused)){
return -1;
}
return 0;
}
static int
add_smulx_escapes(tinfo* ti, size_t* tablelen, size_t* tableused){
if(grow_esc_table(ti, "\x1b[4:3m", ESCAPE_SMULX, tablelen, tableused) ||
@ -207,6 +220,9 @@ apply_term_heuristics(tinfo* ti, const char* termname, int fd,
if(add_smulx_escapes(ti, tablelen, tableused)){
return -1;
}
if(add_u7_escape(ti, tablelen, tableused)){
return -1;
}
}else if(qterm == TERMINAL_ALACRITTY){
termname = "Alacritty";
ti->caps.quadrants = true;

Loading…
Cancel
Save