From 2a1a1b586447432f5aca7707305f57872cfb45ee Mon Sep 17 00:00:00 2001 From: MATSUDA Takashi Date: Mon, 14 Mar 2022 05:30:54 +0900 Subject: [PATCH] enhanced mouse tracking mode (1006) is set improperly when exiting tcell (#512) --- tscreen.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tscreen.go b/tscreen.go index 2c161cc..8def261 100644 --- a/tscreen.go +++ b/tscreen.go @@ -948,8 +948,9 @@ func (t *tScreen) enableMouse(f MouseFlags) { if f&MouseMotionEvents != 0 { t.TPuts("\x1b[?1003h") } - - t.TPuts("\x1b[?1006h") + if f&(MouseButtonEvents|MouseDragEvents|MouseMotionEvents) != 0 { + t.TPuts("\x1b[?1006h") + } } }