summaryrefslogtreecommitdiff
path: root/src/tui/light.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-05-18 02:33:37 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-05-18 02:43:58 +0900
commit97a725fbd0e54cbc07e4d72661ea2bd2bb7c01c1 (patch)
tree1508b3c1bf2ae5d649e43c342b5cc27e83a75505 /src/tui/light.go
parentace92ba281669df7f1d5c434789c454e98dde45b (diff)
downloadfzf-97a725fbd0e54cbc07e4d72661ea2bd2bb7c01c1.tar.gz
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.
Diffstat (limited to 'src/tui/light.go')
-rw-r--r--src/tui/light.go10
1 files changed, 5 insertions, 5 deletions
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
}