[kitty] move cursor prior to positioning command, closes #2155

pull/2159/head
nick black 3 years ago
parent 956a2b03ec
commit 831a65aa7c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1154,8 +1154,10 @@ int kitty_draw(const tinfo* ti, const ncpile* p, sprixel* s, fbuf* f,
// returns -1 on failure, 0 on success (move bytes do not count for sprixel stats)
int kitty_move(sprixel* s, fbuf* f, unsigned noscroll){
int ret = 0;
if(fbuf_printf(f, "\e_Ga=p,i=%d,p=1,q=2%s\e\\", s->id,
noscroll ? ",C=1" : "") < 0){
if(goto_location(ncplane_notcurses(s->n), f, s->n->absy, s->n->absx)){
ret = -1;
}else if(fbuf_printf(f, "\e_Ga=p,i=%d,p=1,q=2%s\e\\", s->id,
noscroll ? ",C=1" : "") < 0){
ret = -1;
}
s->invalidated = SPRIXEL_QUIESCENT;

@ -823,7 +823,8 @@ clean_sprixels(notcurses* nc, ncpile* p, fbuf* f, int scrolls){
sprixel** parent = &p->sprixelcache;
int64_t bytesemitted = 0;
while( (s = *parent) ){
loginfo("Phase 1 sprixel %u state %d\n", s->id, s->invalidated);
loginfo("Phase 1 sprixel %u state %d loc %d/%d\n", s->id,
s->invalidated, s->n ? s->n->absy : -1, s->n ? s->n->absx : -1);
if(s->invalidated == SPRIXEL_QUIESCENT){
if(p != nc->last_pile){
s->invalidated = SPRIXEL_UNSEEN;

Loading…
Cancel
Save