diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-01-03 00:43:56 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-01-03 00:43:56 +0900 |
commit | 090dee857f1e81f26df6a1b022130d46f3c656fb (patch) | |
tree | a18574523e287f98ed484acce97ae7bbe5c9bfd5 /src | |
parent | d779ff7e6dcf068fbcf743bed45127c3b857ec92 (diff) |
Do not disable mouse on SIGCONT before SIGSTOP
Fix #2161
Diffstat (limited to 'src')
-rw-r--r-- | src/terminal.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index 48011628..e7e98827 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -151,6 +151,7 @@ type Terminal struct { initFunc func() prevLines []itemLine suppress bool + sigstop bool startChan chan bool killChan chan int slab *util.Slab @@ -515,6 +516,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal { eventBox: eventBox, mutex: sync.Mutex{}, suppress: true, + sigstop: false, slab: util.MakeSlab(slab16Size, slab32Size), theme: opts.Theme, startChan: make(chan bool, 1), @@ -2073,7 +2075,7 @@ func (t *Terminal) Loop() { case reqRefresh: t.suppress = false case reqReinit: - t.tui.Resume(t.fullscreen, true) + t.tui.Resume(t.fullscreen, t.sigstop) t.redraw() case reqRedraw: t.redraw() @@ -2489,6 +2491,7 @@ func (t *Terminal) Loop() { case actSigStop: p, err := os.FindProcess(os.Getpid()) if err == nil { + t.sigstop = true t.tui.Clear() t.tui.Pause(t.fullscreen) notifyStop(p) |