MCPcopy
hub / github.com/mathaou/termdbms / GetRow

Method GetRow

viewer/tableutil.go:86–94  ·  view source on GitHub ↗

GetRow does math to get a valid row that's helpful

()

Source from the content-addressed store, hash-verified

84
85// GetRow does math to get a valid row that's helpful
86func (m *TuiModel) GetRow() int {
87 baseVal := Max(m.MouseData.Y-HeaderHeight, 0)
88 if m.UI.RenderSelection || m.UI.EditModeEnabled {
89 return m.Viewport.YOffset + baseVal
90 } else if m.UI.FormatModeEnabled {
91 return m.Scroll.PreScrollYOffset + baseVal
92 }
93 return baseVal
94}
95
96// GetSchemaName gets the current schema name
97func (m *TuiModel) GetSchemaName() string {

Callers 6

GetRowDataMethod · 0.95
GetSelectedOptionMethod · 0.95
initFunction · 0.80
HandleMouseEventsFunction · 0.80
DisplayTableFunction · 0.80
DisplaySelectionFunction · 0.80

Calls 1

MaxFunction · 0.85

Tested by

no test coverage detected