Skip to content
Myr

Do not disable mouse after execute(-silent) when --height option is used

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The action takes place in the alternate screen so the offsets should still be correct.

authored by Junegunn Choi · committed by Junegunn Choi · parent ace92ba · Browse files · 5 files+16 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+16 added−16 removed

  • other:+16 added−16 removed

5 files+16 added−16 removed

modified:src/tui/dummy.go+6 added-6 removed
23 unmodified lines
24 Blink2 = Attr(1 << 5)25 Reverse = Attr(1 << 6)26)2728func (r *FullscreenRenderer) Init() {}29func (r *FullscreenRenderer) Pause(bool) {}30func (r *FullscreenRenderer) Resume(bool) {}31func (r *FullscreenRenderer) Clear() {}32func (r *FullscreenRenderer) Refresh() {}33func (r *FullscreenRenderer) Close() {}28func (r *FullscreenRenderer) Init() {}29func (r *FullscreenRenderer) Pause(bool) {}30func (r *FullscreenRenderer) Resume(bool, bool) {}31func (r *FullscreenRenderer) Clear() {}32func (r *FullscreenRenderer) Refresh() {}33func (r *FullscreenRenderer) Close() {}3435func (r *FullscreenRenderer) DoesAutoWrap() bool { return false }36func (r *FullscreenRenderer) GetChar() Event { return Event{} }37func (r *FullscreenRenderer) MaxX() int { return 0 }
7 unmodified lines
modified:src/tui/light.go+5 added-5 removed
559 unmodified lines
560 r.flush()561 }562}563564func (r *LightRenderer) Resume(clear bool) {564func (r *LightRenderer) Resume(clear bool, sigcont bool) {565 r.setupTerminal()566 if clear {567 if r.fullscreen {568 r.smcup()569 } else {570 r.rmcup()571 }572 r.flush()573 } else if !r.fullscreen && r.mouse {574 // NOTE: Resume(false) is only called on SIGCONT after SIGSTOP.575 // And It's highly likely that the offset we obtained at the beginning will576 // no longer be correct, so we simply disable mouse input.573 } else if sigcont && !r.fullscreen && r.mouse {574 // NOTE: SIGCONT (Coming back from CTRL-Z):575 // It's highly likely that the offset we obtained at the beginning is576 // no longer correct, so we simply disable mouse input.577 r.csi("?1000l")578 r.mouse = false579 }580}
347 unmodified lines
modified:src/tui/tcell.go+1 added-1 removed
392 unmodified lines
393 _screen.Fini()394 }395}396397func (r *FullscreenRenderer) Resume(clear bool) {397func (r *FullscreenRenderer) Resume(clear bool, sigcont bool) {398 if clear {399 r.initScreen()400 }401}
220 unmodified lines
modified:src/tui/tui.go+1 added-1 removed
273 unmodified lines
274275type Renderer interface {276 Init()277 Pause(clear bool)278 Resume(clear bool)278 Resume(clear bool, sigcont bool)279 Clear()280 RefreshWindows(windows []Window)281 Refresh()282 Close()
240 unmodified lines
modified:src/terminal.go+3 added-3 removed
1420 unmodified lines
1421 cmd.Stdout = os.Stdout1422 cmd.Stderr = os.Stderr1423 t.tui.Pause(true)1424 cmd.Run()1425 t.tui.Resume(true)1425 t.tui.Resume(true, false)1426 t.redraw()1427 t.refresh()1428 } else {1429 t.tui.Pause(false)1430 cmd.Run()1431 t.tui.Resume(false)1431 t.tui.Resume(false, false)1432 }1433 cleanTemporaryFiles()1434}1435
264 unmodified lines
1700 t.printHeader()1701 case reqRefresh:1702 t.suppress = false1703 case reqReinit:1704 t.tui.Resume(t.fullscreen)1704 t.tui.Resume(t.fullscreen, true)1705 t.redraw()1706 case reqRedraw:1707 t.redraw()1708 case reqClose:
523 unmodified lines