Skip to content

Commit

Permalink
Implement missing methods in cScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn authored and gdamore committed Dec 3, 2023
1 parent 168f47f commit b4e2d68
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions console_win.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b4e2d68

Please sign in to comment.