MCPcopy
hub / github.com/mum4k/termdash / countCellsWithFGColor

Function countCellsWithFGColor

widgets/linechart/linechart_test.go:1939–1950  ·  view source on GitHub ↗
(ft *faketerm.Terminal, want cell.Color)

Source from the content-addressed store, hash-verified

1937}
1938
1939func countCellsWithFGColor(ft *faketerm.Terminal, want cell.Color) int {
1940 count := 0
1941 buffer := ft.BackBuffer()
1942 for x := range buffer {
1943 for y := range buffer[x] {
1944 if buffer[x][y].Opts.FgColor == want {
1945 count++
1946 }
1947 }
1948 }
1949 return count
1950}
1951
1952func TestValueAtOnlyHitsRenderedLineAndDoesNotBlockScroll(t *testing.T) {
1953 lc, err := New(BrailleOnly(), XAxisUnscaled())

Callers 1

Calls 1

BackBufferMethod · 0.80

Tested by

no test coverage detected