summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-01-24 12:41:40 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-01-24 12:41:40 +0900
commitd0a0f3c0520ba744c2769e8a2b1159bb098c5488 (patch)
treeedbb289e6dd457eae510e660becd16e916e39429
parent91b9591b10911263265cb36248db6f95d4fabde3 (diff)
Temporarily disable mouse mode when switching to an external command
-rw-r--r--src/tui/light.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tui/light.go b/src/tui/light.go
index 5a011db5..aca4c0bb 100644
--- a/src/tui/light.go
+++ b/src/tui/light.go
@@ -605,6 +605,7 @@ func (r *LightRenderer) rmcup() {
}
func (r *LightRenderer) Pause(clear bool) {
+ r.disableMouse()
r.restoreTerminal()
if clear {
if r.fullscreen {
@@ -630,7 +631,6 @@ func (r *LightRenderer) disableMouse() {
r.csi("?1000l")
r.csi("?1002l")
r.csi("?1006l")
- r.mouse = false
}
}
@@ -649,6 +649,7 @@ func (r *LightRenderer) Resume(clear bool, sigcont bool) {
// It's highly likely that the offset we obtained at the beginning is
// no longer correct, so we simply disable mouse input.
r.disableMouse()
+ r.mouse = false
}
}