From 97a725fbd0e54cbc07e4d72661ea2bd2bb7c01c1 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 18 May 2020 02:33:37 +0900 Subject: Do not disable mouse after execute(-silent) when --height option is used The action takes place in the alternate screen so the offsets should still be correct. --- src/tui/light.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/tui/light.go') diff --git a/src/tui/light.go b/src/tui/light.go index 3ff84870..cccf3a9b 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -561,7 +561,7 @@ func (r *LightRenderer) Pause(clear bool) { } } -func (r *LightRenderer) Resume(clear bool) { +func (r *LightRenderer) Resume(clear bool, sigcont bool) { r.setupTerminal() if clear { if r.fullscreen { @@ -570,10 +570,10 @@ func (r *LightRenderer) Resume(clear bool) { r.rmcup() } r.flush() - } else if !r.fullscreen && r.mouse { - // NOTE: Resume(false) is only called on SIGCONT after SIGSTOP. - // And It's highly likely that the offset we obtained at the beginning will - // no longer be correct, so we simply disable mouse input. + } else if sigcont && !r.fullscreen && r.mouse { + // NOTE: SIGCONT (Coming back from CTRL-Z): + // It's highly likely that the offset we obtained at the beginning is + // no longer correct, so we simply disable mouse input. r.csi("?1000l") r.mouse = false } -- cgit v1.2.3