docs: fix typos and improve comment clarity

This commit is contained in:
Glenn Gonda
2023-02-16 17:49:32 -05:00
committed by Christian Rocha
parent ee382285e7
commit 3d3ed883d3
15 changed files with 51 additions and 51 deletions
+6 -6
View File
@@ -35,7 +35,7 @@ type Column struct {
}
// KeyMap defines keybindings. It satisfies to the help.KeyMap interface, which
// is used to render the menu menu.
// is used to render the menu.
type KeyMap struct {
LineUp key.Binding
LineDown key.Binding
@@ -222,7 +222,7 @@ func (m Model) Focused() bool {
return m.focus
}
// Focus focusses the table, allowing the user to move around the rows and
// Focus focuses the table, allowing the user to move around the rows and
// interact.
func (m *Model) Focus() {
m.focus = true
@@ -274,13 +274,13 @@ func (m Model) Rows() []Row {
return m.rows
}
// SetRows set a new rows state.
// SetRows sets a new rows state.
func (m *Model) SetRows(r []Row) {
m.rows = r
m.UpdateViewport()
}
// SetColumns set a new columns state.
// SetColumns sets a new columns state.
func (m *Model) SetColumns(c []Column) {
m.cols = c
m.UpdateViewport()
@@ -319,7 +319,7 @@ func (m *Model) SetCursor(n int) {
m.UpdateViewport()
}
// MoveUp moves the selection up by any number of row.
// MoveUp moves the selection up by any number of rows.
// It can not go above the first row.
func (m *Model) MoveUp(n int) {
m.cursor = clamp(m.cursor-n, 0, len(m.rows)-1)
@@ -334,7 +334,7 @@ func (m *Model) MoveUp(n int) {
m.UpdateViewport()
}
// MoveDown moves the selection down by any number of row.
// MoveDown moves the selection down by any number of rows.
// It can not go below the last row.
func (m *Model) MoveDown(n int) {
m.cursor = clamp(m.cursor+n, 0, len(m.rows)-1)