Skip to content

Commit

Permalink
refactor(cellbuf): define Screen and Window types
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Jan 6, 2025
1 parent 32bcb60 commit 23c4d48
Show file tree
Hide file tree
Showing 7 changed files with 1,685 additions and 1,673 deletions.
5 changes: 0 additions & 5 deletions cellbuf/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,6 @@ func (b *Buffer) Cell(x int, y int) *Cell {
return b.Lines[y].At(x)
}

// Draw implements Screen.
func (b *Buffer) Draw(x int, y int, c *Cell) bool {
return b.SetCell(x, y, c)
}

// maxCellWidth is the maximum width a terminal cell can get.
const maxCellWidth = 4

Expand Down
9 changes: 0 additions & 9 deletions cellbuf/cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,6 @@ func (c *Cell) Blank() *Cell {
return c
}

// Segment returns a segment of the cell.
func (c *Cell) Segment() Segment {
return Segment{
Content: c.String(),
Style: c.Style,
Link: c.Link,
}
}

// Link represents a hyperlink in the terminal screen.
type Link struct {
URL string
Expand Down
Loading

0 comments on commit 23c4d48

Please sign in to comment.