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

Method GetColumn

viewer/tableutil.go:76–83  ·  view source on GitHub ↗

GetColumn gets the column the mouse cursor is in

()

Source from the content-addressed store, hash-verified

74
75// GetColumn gets the column the mouse cursor is in
76func (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
86func (m *TuiModel) GetRow() int {

Callers 6

GetSelectedColumnNameMethod · 0.95
initFunction · 0.80
initFunction · 0.80
ToggleColumnFunction · 0.80
DisplayTableFunction · 0.80
DisplaySelectionFunction · 0.80

Calls 1

CellWidthMethod · 0.95

Tested by

no test coverage detected