MCPcopy Create free account
hub / github.com/SolarLune/masterplan / LineNumber

Method LineNumber

gui.go:2690–2699  ·  view source on GitHub ↗
(textIndex int)

Source from the content-addressed store, hash-verified

2688}
2689
2690func (label *Label) LineNumber(textIndex int) int {
2691 cp := textIndex
2692 for i, line := range label.RendererResult.TextLines {
2693 cp -= len(line)
2694 if cp < 0 {
2695 return i
2696 }
2697 }
2698 return len(label.RendererResult.TextLines) - 1
2699}
2700
2701func (label *Label) LineCount() int {
2702 if label.RendererResult != nil {

Callers 1

UpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected