GetColumn gets the column the mouse cursor is in
()
| 74 | |
| 75 | // GetColumn gets the column the mouse cursor is in |
| 76 | func (m *TuiModel) GetColumn() int { |
| 77 | baseVal := m.MouseData.X / m.CellWidth() |
| 78 | if m.UI.RenderSelection || m.UI.EditModeEnabled || m.UI.FormatModeEnabled { |
| 79 | return m.Scroll.ScrollXOffset + baseVal |
| 80 | } |
| 81 | |
| 82 | return baseVal |
| 83 | } |
| 84 | |
| 85 | // GetRow does math to get a valid row that's helpful |
| 86 | func (m *TuiModel) GetRow() int { |
no test coverage detected