Fix typos

Found via `codespell -H -S .git -L rightt,wth,bu`
This commit is contained in:
Kian-Meng Ang 2023-11-02 13:24:14 +08:00
parent 2dfe060117
commit 5d85e6a030
6 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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() {

View File

@ -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)

View File

@ -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]

View File

@ -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()