From 3df88384cdf9cf3968a8aa11cec3fbfeb3868bec Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 10 Jul 2021 21:19:06 -0400 Subject: [PATCH] set XTSHIFTESCAPE when enabling mouse #1061 --- src/lib/internal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/internal.h b/src/lib/internal.h index 2598d18ca..dc752028e 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -1159,9 +1159,13 @@ coerce_styles(FILE* out, const tinfo* ti, uint16_t* curstyle, static inline int mouse_enable(FILE* out){ - return term_emit("\x1b[?" SET_BTN_EVENT_MOUSE ";" +// Sets the shift-escape option, allowing shift+mouse to override the standard +// mouse protocol (mainly so copy-and-paste can still be performed). +#define XTSHIFTESCAPE "\x1b>1s" + return term_emit(XTSHIFTESCAPE "\x1b[?" SET_BTN_EVENT_MOUSE ";" /*SET_FOCUS_EVENT_MOUSE ";" */SET_SGR_MODE_MOUSE "h", out, true); +#undef XTSHIFTESCAPE } static inline int