GetRow does math to get a valid row that's helpful
()
| 84 | |
| 85 | // GetRow does math to get a valid row that's helpful |
| 86 | func (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 |
| 97 | func (m *TuiModel) GetSchemaName() string { |
no test coverage detected