diff --git a/pkg/commands/oscommands/pty_windows.go b/pkg/commands/oscommands/pty_windows.go index e645ae627..ff707c519 100644 --- a/pkg/commands/oscommands/pty_windows.go +++ b/pkg/commands/oscommands/pty_windows.go @@ -204,7 +204,8 @@ func (p *winPty) Close() error { // slave closes on child exit, but ConPTY keeps the pipe alive until we call // ClosePseudoConsole explicitly. Without doing that on child exit, the // scanner in pkg/tasks.NewCmdTask would block forever on the next read and -// the post-content view never gets cleared (FlushStaleCells never fires). +// the render would never reach its end of input, so the new content would +// never be swapped in. func startWaiter(proc *os.Process, p *winPty) func() error { done := make(chan struct{}) var waitErr error diff --git a/pkg/gocui/view.go b/pkg/gocui/view.go index fe01e50ca..dba71ab52 100644 --- a/pkg/gocui/view.go +++ b/pkg/gocui/view.go @@ -1248,17 +1248,6 @@ func (v *View) Reset() { v.offscreen = nil } -// This is for when we've done a restart for the sake of avoiding a flicker and -// we've reached the end of the new content to display: we need to clear the remaining -// content from the previous round. We do this by setting v.viewLines to nil so that -// we just render the new content from v.buf.lines directly -func (v *View) FlushStaleCells() { - v.writeMutex.Lock() - defer v.writeMutex.Unlock() - - v.clearViewLines() -} - // BeginOffscreenRender starts building a re-render into an off-screen buffer. // Until SwapInOffscreenRender promotes it, writes go to that buffer and the // displayed buffer — what every reader sees — is left as it was. This is how an diff --git a/pkg/gui/tasks_adapter.go b/pkg/gui/tasks_adapter.go index f2f567a75..5e5295639 100644 --- a/pkg/gui/tasks_adapter.go +++ b/pkg/gui/tasks_adapter.go @@ -170,8 +170,6 @@ func (gui *Gui) getManager(view *gocui.View) *tasks.ViewBufferManager { view.SetOrigin(0, newOriginY) } - - view.FlushStaleCells() }, func() { view.SetOrigin(0, 0)