From b4e2d6811337995fbc6109cd6761368929c76ed8 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 8 Nov 2023 14:29:02 +0900 Subject: [PATCH] Implement missing methods in cScreen --- console_win.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/console_win.go b/console_win.go index 7fc9441e..8505642a 100644 --- a/console_win.go +++ b/console_win.go @@ -1332,3 +1332,22 @@ func (s *cScreen) Suspend() error { func (s *cScreen) Resume() error { return s.engage() } + +func (s *cScreen) LockRegion(x, y, width, height int, lock bool) { + s.Lock() + defer s.Unlock() + for j := y; j < (y + height); j += 1 { + for i := x; i < (x + width); i += 1 { + switch lock { + case true: + s.cells.LockCell(i, j) + case false: + s.cells.UnlockCell(i, j) + } + } + } +} + +func (s *cScreen) Tty() (Tty, bool) { + return nil, true +}