From 04febb20d5b6ef27540174bd6c8bdc4e6d64de14 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 7 Aug 2023 15:45:46 +0530 Subject: [PATCH] ... --- tools/tui/loop/write.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/tui/loop/write.go b/tools/tui/loop/write.go index 120b16f93..9013fe0a3 100644 --- a/tools/tui/loop/write.go +++ b/tools/tui/loop/write.go @@ -55,8 +55,7 @@ func writestring_ignoring_temporary_errors(f *tty.Term, buf string) (int, error) func (self *Loop) flush_pending_writes(tty_write_channel chan<- write_msg) (num_sent int) { defer func() { if num_sent > 0 { - n := copy(self.pending_writes, self.pending_writes[num_sent:]) - self.pending_writes = self.pending_writes[:n] + self.pending_writes = utils.ShiftLeft(self.pending_writes, num_sent) } }() for len(self.pending_writes) > num_sent {