From 5d85e6a0302a2b6b46e80527cf40a2a2f0d3356e Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Thu, 2 Nov 2023 13:24:14 +0800 Subject: [PATCH] Fix typos Found via `codespell -H -S .git -L rightt,wth,bu` --- application.go | 2 +- form.go | 2 +- image.go | 2 +- semigraphics.go | 2 +- table.go | 2 +- textview.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application.go b/application.go index 2359b32..0b699ef 100644 --- a/application.go +++ b/application.go @@ -569,7 +569,7 @@ func (a *Application) Draw() *Application { // ForceDraw refreshes the screen immediately. Use this function with caution as // it may lead to race conditions with updates to primitives in other -// goroutines. It is always preferrable to call [Application.Draw] instead. +// goroutines. It is always preferable to call [Application.Draw] instead. // Never call this function from a goroutine. // // It is safe to call this function during queued updates and direct event diff --git a/form.go b/form.go index c31fcf9..8b0611f 100644 --- a/form.go +++ b/form.go @@ -454,7 +454,7 @@ func (f *Form) GetFormItemIndex(label string) int { } // GetFocusedItemIndex returns the indices of the form element or button which -// currently has focus. If they don't, -1 is returned resepectively. +// currently has focus. If they don't, -1 is returned respectively. func (f *Form) GetFocusedItemIndex() (formItem, button int) { index := f.focusIndex() if index < 0 { diff --git a/image.go b/image.go index b6ed9cf..53a7488 100644 --- a/image.go +++ b/image.go @@ -294,7 +294,7 @@ func (i *Image) Focus(delegate func(p Primitive)) { i.Box.Focus(delegate) } -// render re-populates the [Image.pixels] slice besed on the current settings, +// render re-populates the [Image.pixels] slice based on the current settings, // if [Image.lastWidth] and [Image.lastHeight] don't match the current image's // size. It also sets the new image size in these two variables. func (i *Image) render() { diff --git a/semigraphics.go b/semigraphics.go index f85da43..55b7f41 100644 --- a/semigraphics.go +++ b/semigraphics.go @@ -7,7 +7,7 @@ import "github.com/gdamore/tcell/v2" // Named like the unicode characters, 'Semigraphics'-prefix used if unicode block // isn't prefixed itself. const ( - // Block: General Punctation U+2000-U+206F (http://unicode.org/charts/PDF/U2000.pdf) + // Block: General Punctuation U+2000-U+206F (http://unicode.org/charts/PDF/U2000.pdf) SemigraphicsHorizontalEllipsis rune = '\u2026' // … // Block: Box Drawing U+2500-U+257F (http://unicode.org/charts/PDF/U2500.pdf) diff --git a/table.go b/table.go index ba28087..84ec8ed 100644 --- a/table.go +++ b/table.go @@ -1027,7 +1027,7 @@ func (t *Table) Draw(screen tcell.Screen) { // Backward-evaluate columns. startLen := len(columns) defer func() { - // Becaue we went backwards, we must reverse the partial slices. + // Because we went backwards, we must reverse the partial slices. for i, j := startLen, len(columns)-1; i < j; i, j = i+1, j-1 { columns[i], columns[j] = columns[j], columns[i] widths[i], widths[j] = widths[j], widths[i] diff --git a/textview.go b/textview.go index 200c8cc..fcb9808 100644 --- a/textview.go +++ b/textview.go @@ -575,7 +575,7 @@ func (t *TextView) Clear() *TextView { return t } -// clear is the internal implementaton of clear. It is used by TextViewWriter +// clear is the internal implementation of clear. It is used by TextViewWriter // and anywhere that we need to perform a write without locking the buffer. func (t *TextView) clear() { t.text.Reset()