From b2d948b53c97a23c09ad558108760ee243eee2c8 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 17 Jan 2021 11:53:47 -0300 Subject: [PATCH] Fixed a couple of typos Signed-off-by: Carlos Alexandro Becker --- renderer.go | 6 +++--- tea.go | 8 ++++---- tty_unix.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/renderer.go b/renderer.go index 51c811a..e919801 100644 --- a/renderer.go +++ b/renderer.go @@ -196,7 +196,7 @@ func (r *renderer) write(s string) { _, _ = 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. func (r *renderer) setIgnoredLines(from int, to int) { // 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 // 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 // use in high-performance rendering, such as a pager that could potentially // 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(). // // 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. func (r *renderer) insertBottom(lines []string, topBoundary, bottomBoundary int) { r.mtx.Lock() diff --git a/tea.go b/tea.go index 317e1e2..dde6a56 100644 --- a/tea.go +++ b/tea.go @@ -51,7 +51,7 @@ type Model interface { // function. 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. func Batch(cmds ...Cmd) Cmd { 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. // // Example usage: @@ -107,7 +107,7 @@ type Program struct { renderer *renderer 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 // from panics, print the stack trace, and disable raw mode. This feature // is on by default. @@ -367,7 +367,7 @@ func (p *Program) EnableMouseCellMotion() { } // 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! func (p *Program) DisableMouseCellMotion() { p.mtx.Lock() diff --git a/tty_unix.go b/tty_unix.go index c2b0015..4bfa843 100644 --- a/tty_unix.go +++ b/tty_unix.go @@ -6,4 +6,4 @@ import "io" // enableAnsiColors is only needed for Windows, so for other systems this is // a no-op. -func enableAnsiColors(w io.Writer) {} +func enableAnsiColors(_ io.Writer) {}