sixel: only clear sixel images on RM (Reset Mode) if we are in alt screen ref. #102

This commit is contained in:
Bakkeby 2023-09-12 16:11:08 +02:00
parent c1ef3ce0d8
commit 1c03f10db9
1 changed files with 4 additions and 2 deletions

2
st.c
View File

@ -2342,8 +2342,10 @@ csihandle(void)
case 'l': /* RM -- Reset Mode */ case 'l': /* RM -- Reset Mode */
tsetmode(csiescseq.priv, 0, csiescseq.arg, csiescseq.narg); tsetmode(csiescseq.priv, 0, csiescseq.arg, csiescseq.narg);
#if SIXEL_PATCH #if SIXEL_PATCH
if (IS_SET(MODE_ALTSCREEN)) {
for (im = term.images; im; im = im->next) for (im = term.images; im; im = im->next)
im->should_delete = 1; im->should_delete = 1;
}
#endif // SIXEL_PATCH #endif // SIXEL_PATCH
break; break;
case 'M': /* DL -- Delete <n> lines */ case 'M': /* DL -- Delete <n> lines */