osdep/terminal.h: Rename screen buffer controls

SAVE/RESTORE were a bit misleading.
This commit is contained in:
Mia Herkt 2022-12-20 10:26:53 +01:00
parent a4cac2ddc6
commit 08747c4965
No known key found for this signature in database
GPG Key ID: 72E154B8622EC191
3 changed files with 6 additions and 6 deletions

View File

@ -28,8 +28,8 @@
#define TERM_ESC_RESTORE_CURSOR "\033[?25h"
#define TERM_ESC_CLEAR_SCREEN "\033[2J"
#define TERM_ESC_SAVE_SCREEN "\033[?1049h"
#define TERM_ESC_RESTORE_SCREEN "\033[?1049l"
#define TERM_ESC_ALT_SCREEN "\033[?1049h"
#define TERM_ESC_NORMAL_SCREEN "\033[?1049l"
struct input_ctx;

View File

@ -505,7 +505,7 @@ static int preinit(struct vo *vo)
sixel_output_set_encode_policy(priv->output, SIXEL_ENCODEPOLICY_FAST);
if (priv->opts.alt_screen)
sixel_strwrite(TERM_ESC_SAVE_SCREEN);
sixel_strwrite(TERM_ESC_ALT_SCREEN);
sixel_strwrite(TERM_ESC_HIDE_CURSOR);
@ -549,7 +549,7 @@ static void uninit(struct vo *vo)
sixel_strwrite(TERM_ESC_RESTORE_CURSOR);
if (priv->opts.alt_screen)
sixel_strwrite(TERM_ESC_RESTORE_SCREEN);
sixel_strwrite(TERM_ESC_NORMAL_SCREEN);
fflush(stdout);
if (priv->output) {

View File

@ -278,7 +278,7 @@ static void flip_page(struct vo *vo)
static void uninit(struct vo *vo)
{
printf(TERM_ESC_RESTORE_CURSOR);
printf(TERM_ESC_RESTORE_SCREEN);
printf(TERM_ESC_NORMAL_SCREEN);
struct priv *p = vo->priv;
if (p->frame)
talloc_free(p->frame);
@ -302,7 +302,7 @@ static int preinit(struct vo *vo)
}
printf(TERM_ESC_HIDE_CURSOR);
printf(TERM_ESC_SAVE_SCREEN);
printf(TERM_ESC_ALT_SCREEN);
return 0;
}