diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-08 22:20:40 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-08 22:20:40 +0300 |
| commit | f957b4ccecc6605aed56b36635d16ca9544931a3 (patch) | |
| tree | 9599a4e69199913760ae4b4e2073d750e038cc5f | |
| parent | bbc50bef3c04d6b727d69600834510b8ae3cbe11 (diff) | |
Document SelectedRow nil contract for task c
| -rw-r--r-- | internal/atable/table.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/atable/table.go b/internal/atable/table.go index d31088e..e89dafc 100644 --- a/internal/atable/table.go +++ b/internal/atable/table.go @@ -317,7 +317,8 @@ func (m *Model) UpdateViewport() { ) } -// SelectedRow returns the selected row. +// SelectedRow returns the selected row, or nil when the cursor is out of range +// and no row is selected. // You can cast it to your own implementation. func (m Model) SelectedRow() Row { if m.cursor < 0 || m.cursor >= len(m.rows) { |
