Fixed a couple of typos

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-01-17 11:53:47 -03:00 committed by Christian Muehlhaeuser
parent e9efdf841b
commit b2d948b53c
3 changed files with 8 additions and 8 deletions

View File

@ -196,7 +196,7 @@ func (r *renderer) write(s string) {
_, _ = r.buf.WriteString(s) _, _ = r.buf.WriteString(s)
} }
// setIngoredLines speicifies lines not to be touched by the standard Bubble Tea // setIgnoredLines specifies lines not to be touched by the standard Bubble Tea
// renderer. // renderer.
func (r *renderer) setIgnoredLines(from int, to int) { func (r *renderer) setIgnoredLines(from int, to int) {
// Lock if we're going to be clearing some lines since we don't want // Lock if we're going to be clearing some lines since we don't want
@ -247,7 +247,7 @@ func (r *renderer) clearIgnoredLines() {
// full-window applications (generally those that use the alternate screen // full-window applications (generally those that use the alternate screen
// buffer). // buffer).
// //
// This method bypasses the normal rendering buffer and is philisophically // This method bypasses the normal rendering buffer and is philosophically
// different than the normal way we approach rendering in Bubble Tea. It's for // different than the normal way we approach rendering in Bubble Tea. It's for
// use in high-performance rendering, such as a pager that could potentially // use in high-performance rendering, such as a pager that could potentially
// be rendering very complicated ansi. In cases where the content is simpler // be rendering very complicated ansi. In cases where the content is simpler
@ -277,7 +277,7 @@ func (r *renderer) insertTop(lines []string, topBoundary, bottomBoundary int) {
// To call this function use the command ScrollDown(). // To call this function use the command ScrollDown().
// //
// See note in insertTop() for caveats, how this function only makes sense for // See note in insertTop() for caveats, how this function only makes sense for
// full-window applications, and how it differs from the noraml way we do // full-window applications, and how it differs from the normal way we do
// rendering in Bubble Tea. // rendering in Bubble Tea.
func (r *renderer) insertBottom(lines []string, topBoundary, bottomBoundary int) { func (r *renderer) insertBottom(lines []string, topBoundary, bottomBoundary int) {
r.mtx.Lock() r.mtx.Lock()

8
tea.go
View File

@ -51,7 +51,7 @@ type Model interface {
// function. // function.
type Cmd func() Msg type Cmd func() Msg
// Batch peforms a bunch of commands concurrently with no ordering guarantees // Batch performs a bunch of commands concurrently with no ordering guarantees
// about the results. // about the results.
func Batch(cmds ...Cmd) Cmd { func Batch(cmds ...Cmd) Cmd {
if len(cmds) == 0 { if len(cmds) == 0 {
@ -62,7 +62,7 @@ func Batch(cmds ...Cmd) Cmd {
} }
} }
// ProgramOption is used to set options when intializing a Program. Program can // ProgramOption is used to set options when initializing a Program. Program can
// accept a variable number of options. // accept a variable number of options.
// //
// Example usage: // Example usage:
@ -107,7 +107,7 @@ type Program struct {
renderer *renderer renderer *renderer
altScreenActive bool altScreenActive bool
// CatchPanics is incredibly useful for restoring the terminal to a useable // CatchPanics is incredibly useful for restoring the terminal to a usable
// state after a panic occurs. When this is set, Bubble Tea will recover // state after a panic occurs. When this is set, Bubble Tea will recover
// from panics, print the stack trace, and disable raw mode. This feature // from panics, print the stack trace, and disable raw mode. This feature
// is on by default. // is on by default.
@ -367,7 +367,7 @@ func (p *Program) EnableMouseCellMotion() {
} }
// DisableMouseCellMotion disables Mouse Cell Motion tracking. If you've // DisableMouseCellMotion disables Mouse Cell Motion tracking. If you've
// enabled Cell Motion mouse trakcing be sure to call this as your program is // enabled Cell Motion mouse tracking be sure to call this as your program is
// exiting or your users will be very upset! // exiting or your users will be very upset!
func (p *Program) DisableMouseCellMotion() { func (p *Program) DisableMouseCellMotion() {
p.mtx.Lock() p.mtx.Lock()

View File

@ -6,4 +6,4 @@ import "io"
// enableAnsiColors is only needed for Windows, so for other systems this is // enableAnsiColors is only needed for Windows, so for other systems this is
// a no-op. // a no-op.
func enableAnsiColors(w io.Writer) {} func enableAnsiColors(_ io.Writer) {}