diff --git a/cellbuf/cell.go b/cellbuf/cell.go index 4cc9274c..72475aec 100644 --- a/cellbuf/cell.go +++ b/cellbuf/cell.go @@ -25,16 +25,12 @@ type Cell struct { // Width is the mono-space width of the grapheme cluster. Width int - - // Zone is the zone id of the cell. - Zone int } // Equal returns whether the cell is equal to the other cell. func (c Cell) Equal(o Cell) bool { return c.Width == o.Width && c.Content == o.Content && - c.Zone == o.Zone && c.Style.Equal(o.Style) && c.Link.Equal(o.Link) } @@ -43,7 +39,6 @@ func (c Cell) Equal(o Cell) bool { func (c Cell) Empty() bool { return c.Content == "" && c.Width == 0 && - c.Zone == 0 && c.Style.Empty() && c.Link.Empty() } @@ -52,7 +47,6 @@ func (c Cell) Empty() bool { func (c *Cell) Reset() { c.Content = "" c.Width = 0 - c.Zone = 0 c.Style.Reset() c.Link.Reset() } diff --git a/cellbuf/screen.go b/cellbuf/screen.go index 66ddcfb6..9b2ea1a2 100644 --- a/cellbuf/screen.go +++ b/cellbuf/screen.go @@ -69,7 +69,6 @@ func RenderLine(d Screen, n int) (w int, line string) { func RenderLineWithProfile(d Screen, n int, p colorprofile.Profile) (w int, line string) { var pen Style var link Link - var zone int var buf bytes.Buffer var pendingLine string var pendingWidth int // this ignores space cells until we hit a non-space cell @@ -114,17 +113,6 @@ func RenderLineWithProfile(d Screen, n int, p colorprofile.Profile) (w int, line link = cellLink } - // Write the Bubblezone escape sequence - if cell.Zone != zone { - writePending() - if cell.Zone == 0 { - buf.WriteString(ansi.SetZone(zone)) //nolint:errcheck - } else { - buf.WriteString(ansi.SetZone(cell.Zone)) //nolint:errcheck - } - zone = cell.Zone - } - // We only write the cell content if it's not empty. If it is, we // append it to the pending line and width to be evaluated later. if cell.Equal(spaceCell) { diff --git a/cellbuf/screen_write.go b/cellbuf/screen_write.go index 25889c94..a2765b55 100644 --- a/cellbuf/screen_write.go +++ b/cellbuf/screen_write.go @@ -19,7 +19,6 @@ func setContent( var cell Cell var pen Style var link Link - var zone int var x, y int p := ansi.GetParser() @@ -57,7 +56,6 @@ func setContent( cell.Width = width cell.Style = pen cell.Link = link - cell.Zone = zone dis.SetCell(x, y, cell) //nolint:errcheck @@ -78,8 +76,6 @@ func setContent( switch p.Cmd { case 'm': // SGR - Select Graphic Rendition handleSgr(p, &pen) - case 'z': // Bubblezone - handleZone(p, &zone) } case ansi.HasOscPrefix(seq) && p.Cmd != 0: switch p.Cmd { @@ -222,17 +218,3 @@ func handleHyperlinks(p *ansi.Parser, link *Link) { } link.URL = string(params[2]) } - -// handleZone handles Bubblezone escape sequences. -func handleZone(p *ansi.Parser, zone *int) { - if p.ParamsLen == 0 { - return - } - - z := ansi.Param(p.Params[0]).Param() - if *zone == z { - *zone = 0 - } else { - *zone = z - } -}