mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-24 14:44:38 +03:00
Fix various godoc comments
This commit is contained in:
parent
505a16d057
commit
091c915462
@ -165,7 +165,12 @@ func (m Model) FullHelpView(groups [][]key.Binding) string {
|
||||
}
|
||||
|
||||
var (
|
||||
out []string
|
||||
// Linter note: at this time we don't think it's worth the additional
|
||||
// code complexity involved in preallocating this slice.
|
||||
//
|
||||
//nolint:prealloc
|
||||
out []string
|
||||
|
||||
totalWidth int
|
||||
sep = m.Styles.FullSeparator.Render(m.FullSeparator)
|
||||
sepWidth = lipgloss.Width(sep)
|
||||
|
@ -75,6 +75,8 @@ func (f filteredItems) matches() [][]int {
|
||||
return agg
|
||||
}
|
||||
|
||||
// FilterMatchesMsg contains data about items matched during filtering. The
|
||||
// message should be routed to Update for processing.
|
||||
type FilterMatchesMsg []filteredItem
|
||||
|
||||
type statusMessageTimeoutMsg struct{}
|
||||
|
@ -98,6 +98,11 @@ func WithWidth(w int) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpringOptions sets the initial frequency and damping options for the
|
||||
// progressbar's built-in spring-based animation. Frequency corresponds to
|
||||
// speed, and damping to bounciness. For details see:
|
||||
//
|
||||
// https://github.com/charmbracelet/harmonica
|
||||
func WithSpringOptions(frequency, damping float64) Option {
|
||||
return func(m *Model) {
|
||||
m.SetSpringOptions(frequency, damping)
|
||||
@ -213,7 +218,8 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
||||
// SetSpringOptions sets the frequency and damping for the current spring.
|
||||
// Frequency corresponds to speed, and damping to bounciness. For details see:
|
||||
// https://github.com/charmbracelet/harmonica.
|
||||
//
|
||||
// https://github.com/charmbracelet/harmonica
|
||||
func (m *Model) SetSpringOptions(frequency, damping float64) {
|
||||
m.spring = harmonica.NewSpring(harmonica.FPS(fps), frequency, damping)
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ const (
|
||||
// seen for password fields on the command line.
|
||||
EchoNone
|
||||
|
||||
// EchoOnEdit
|
||||
// EchoOnEdit.
|
||||
)
|
||||
|
||||
// blinkCtx manages cursor blinking.
|
||||
@ -234,7 +234,7 @@ func (m *Model) cursorStart() bool {
|
||||
return m.setCursor(0)
|
||||
}
|
||||
|
||||
// CursorEnd moves the cursor to the end of the input field
|
||||
// CursorEnd moves the cursor to the end of the input field.
|
||||
func (m *Model) CursorEnd() {
|
||||
m.cursorEnd()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user