mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 12:46:14 +00:00
docs: fix typos and improve comment clarity
This commit is contained in:
committed by
Christian Rocha
parent
ee382285e7
commit
3d3ed883d3
+6
-6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user