mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
[kitty] silence present command #1865
This commit is contained in:
parent
9a53379d36
commit
2e7079a69e
@ -383,8 +383,10 @@ int kitty_wipe(sprixel* s, int ycell, int xcell){
|
||||
// the maximum number of pixels we can convert is the minimum of the
|
||||
// pixels remaining in the target row, and the pixels left in the chunk.
|
||||
//fprintf(stderr, "inchunk: %d total: %d triples: %d\n", inchunk, totalpixels, triples);
|
||||
//fprintf(stderr, "PRECHOMP: [%.16s]\n", c + tripbytes);
|
||||
int chomped = kitty_null(c + tripbytes, tripskip, thisrow,
|
||||
inchunk - triples * 3, auxvec + auxvecidx);
|
||||
//fprintf(stderr, "POSTCHOMP: [%.16s]\n", c + tripbytes);
|
||||
assert(chomped >= 0);
|
||||
auxvecidx += chomped;
|
||||
assert(auxvecidx <= s->cellpxy * s->cellpxx);
|
||||
@ -419,7 +421,7 @@ int kitty_wipe(sprixel* s, int ycell, int xcell){
|
||||
|
||||
int kitty_commit(FILE* fp, sprixel* s){
|
||||
loginfo("Committing Kitty graphic id %u\n", s->id);
|
||||
fprintf(fp, "\e_Ga=p,i=%u,p=1\e\\", s->id);
|
||||
fprintf(fp, "\e_Ga=p,i=%u,p=1,q=2\e\\", s->id);
|
||||
s->invalidated = SPRIXEL_QUIESCENT;
|
||||
return 0;
|
||||
}
|
||||
@ -640,7 +642,7 @@ int kitty_move(const ncpile* p, sprixel* s, FILE* out){
|
||||
// clears all kitty bitmaps
|
||||
int kitty_clear_all(FILE* fp){
|
||||
//fprintf(stderr, "KITTY UNIVERSAL ERASE\n");
|
||||
return term_emit("\e_Ga=d\e\\", fp, false);
|
||||
return term_emit("\e_Ga=d,q=2\e\\", fp, false);
|
||||
}
|
||||
|
||||
int kitty_shutdown(FILE* fp){
|
||||
|
@ -948,6 +948,7 @@ rasterize_sprixels(notcurses* nc, ncpile* p, FILE* out){
|
||||
if(nc->tcache.pixel_commit(out, s) < 0){
|
||||
return -1;
|
||||
}
|
||||
nc->rstate.hardcursorpos = true;
|
||||
}
|
||||
}else if(s->invalidated == SPRIXEL_HIDE){
|
||||
if(nc->tcache.pixel_remove){
|
||||
|
@ -371,14 +371,10 @@ add_appsync_escapes_dcs(tinfo* ti, size_t* tablelen, size_t* tableused){
|
||||
}
|
||||
|
||||
// Qui si convien lasciare ogne sospetto; ogne viltà convien che qui sia morta.
|
||||
// kitty's ASU implementation is broken through at least 0.21.2, see
|
||||
// https://github.com/kovidgoyal/kitty/issues/3779. until it's fixed, we don't
|
||||
// want to use kitty ASU, so we disable advertised_appsync for now FIXME.
|
||||
static int
|
||||
apply_term_heuristics(tinfo* ti, const char* termname, int fd,
|
||||
queried_terminals_e qterm,
|
||||
size_t* tablelen, size_t* tableused,
|
||||
unsigned* advertised_appsync){
|
||||
size_t* tablelen, size_t* tableused){
|
||||
if(!termname){
|
||||
// setupterm interprets a missing/empty TERM variable as the special value “unknown”.
|
||||
termname = "unknown";
|
||||
@ -395,7 +391,6 @@ apply_term_heuristics(tinfo* ti, const char* termname, int fd,
|
||||
ti->caps.sextants = true; // work since bugfix in 0.19.3
|
||||
ti->caps.quadrants = true;
|
||||
ti->caps.rgb = true;
|
||||
*advertised_appsync = 0; // FIXME see above
|
||||
if(add_smulx_escapes(ti, tablelen, tableused)){
|
||||
return -1;
|
||||
}
|
||||
@ -689,8 +684,7 @@ int interrogate_terminfo(tinfo* ti, int fd, const char* termname, unsigned utf8,
|
||||
}
|
||||
}
|
||||
}
|
||||
if(apply_term_heuristics(ti, termname, fd, qterm, &tablelen, &tableused,
|
||||
&appsync_advertised)){
|
||||
if(apply_term_heuristics(ti, termname, fd, qterm, &tablelen, &tableused)){
|
||||
ncinputlayer_stop(&ti->input);
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user