From b2443aa2f98c1a1fa5d53d4e79a3e7fd221cc365 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 16 Apr 2020 13:35:24 +0000 Subject: Add support for the iTerm2 sychronized updates escape sequence which drastically reduces flickering. --- tmux.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 98d78a63..87d38ef3 100644 --- a/tmux.h +++ b/tmux.h @@ -452,6 +452,7 @@ enum tty_code_code { TTYC_SMUL, TTYC_SMXX, TTYC_SS, + TTYC_SYNC, TTYC_TC, TTYC_TSL, TTYC_U8, @@ -1181,6 +1182,7 @@ struct tty_term { #define TERM_DECSLRM 0x4 #define TERM_DECFRA 0x8 #define TERM_RGBCOLOURS 0x10 +#define TERM_SYNC 0x20 int flags; LIST_ENTRY(tty_term) entry; @@ -1949,6 +1951,8 @@ void tty_set_title(struct tty *, const char *); void tty_update_mode(struct tty *, int, struct screen *); void tty_draw_line(struct tty *, struct window_pane *, struct screen *, u_int, u_int, u_int, u_int, u_int); +void tty_sync_start(struct tty *); +void tty_sync_end(struct tty *); int tty_open(struct tty *, char **); void tty_close(struct tty *); void tty_free(struct tty *); @@ -1976,6 +1980,8 @@ void tty_cmd_scrolldown(struct tty *, const struct tty_ctx *); void tty_cmd_reverseindex(struct tty *, const struct tty_ctx *); void tty_cmd_setselection(struct tty *, const struct tty_ctx *); void tty_cmd_rawstring(struct tty *, const struct tty_ctx *); +void tty_cmd_syncstart(struct tty *, const struct tty_ctx *); +void tty_cmd_syncend(struct tty *, const struct tty_ctx *); /* tty-term.c */ extern struct tty_terms tty_terms; -- cgit From 4744aa43af47815a9c4c110cceb3959b1662e54b Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 16 Apr 2020 14:03:51 +0000 Subject: Add a helper function to get the terminal flags. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 87d38ef3..dbf3244f 100644 --- a/tmux.h +++ b/tmux.h @@ -1957,6 +1957,7 @@ int tty_open(struct tty *, char **); void tty_close(struct tty *); void tty_free(struct tty *); void tty_set_flags(struct tty *, int); +int tty_get_flags(struct tty *); void tty_write(void (*)(struct tty *, const struct tty_ctx *), struct tty_ctx *); void tty_cmd_alignmenttest(struct tty *, const struct tty_ctx *); -- cgit From 5ec80bd249a37147207ec2ef420086336ccf78a8 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 16 Apr 2020 14:25:35 +0000 Subject: Move the UTF-8 flag to terminal flags. --- tmux.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index dbf3244f..58840108 100644 --- a/tmux.h +++ b/tmux.h @@ -1183,6 +1183,7 @@ struct tty_term { #define TERM_DECFRA 0x8 #define TERM_RGBCOLOURS 0x10 #define TERM_SYNC 0x20 +#define TERM_UTF8 0x40 int flags; LIST_ENTRY(tty_term) entry; @@ -1235,7 +1236,7 @@ struct tty { #define TTY_NOCURSOR 0x1 #define TTY_FREEZE 0x2 #define TTY_TIMER 0x4 -#define TTY_UTF8 0x8 +/* 0x8 unused */ #define TTY_STARTED 0x10 #define TTY_OPENED 0x20 #define TTY_FOCUS 0x40 -- cgit