diff --git a/internal/completion/insert.go b/internal/completion/insert.go index bc1977d..71dbf65 100644 --- a/internal/completion/insert.go +++ b/internal/completion/insert.go @@ -71,7 +71,7 @@ func (e *Engine) TrimSuffix() { } // But when the key is a space, we also drop the suffix matcher, - // beause the user is done with this precise completion (or group of). + // because the user is done with this precise completion (or group of). if unicode.IsSpace(key) { e.sm = SuffixMatcher{} } diff --git a/internal/core/line.go b/internal/core/line.go index 9d41407..a8c333b 100644 --- a/internal/core/line.go +++ b/internal/core/line.go @@ -497,7 +497,7 @@ func (l *Line) Tokenize(cpos int) ([]string, int, int) { } } - // ... so we ajust here for this case. + // ... so we adjust here for this case. if cpos == len(line) { index = len(split) - 1 pos = len(split[index]) @@ -554,7 +554,7 @@ func (l *Line) TokenizeSpace(cpos int) ([]string, int, int) { } } - // ... so we ajust here for this case. + // ... so we adjust here for this case. if cpos == len(line) { index = len(split) - 1 pos = len(split[index]) @@ -692,7 +692,7 @@ func (l *Line) checkRange(bpos, epos int) (int, int, bool) { return -1, -1, false } - // Check positions out of bounnd + // Check positions out of bound if epos > l.Len() { epos = l.Len() } diff --git a/internal/core/selection_test.go b/internal/core/selection_test.go index 1b0faf4..afe9e51 100644 --- a/internal/core/selection_test.go +++ b/internal/core/selection_test.go @@ -1209,7 +1209,7 @@ func TestSelection_SelectKeyword(t *testing.T) { wantMatch: true, }, { - name: "Multiple subgroups cyle, forward", + name: "Multiple subgroups cycle, forward", fields: fieldsWith(urlLine, &urlCur), args: args{cpos: 32, bpos: 0, epos: 0, next: true, cycles: 2}, wantKbpos: 19, @@ -1217,7 +1217,7 @@ func TestSelection_SelectKeyword(t *testing.T) { wantMatch: true, }, { - name: "Multiple subgroups cyle, reverse", + name: "Multiple subgroups cycle, reverse", fields: fieldsWith(urlLine, &urlCur), args: args{cpos: 32, bpos: 0, epos: 0, next: false, cycles: 2}, wantKbpos: 39, diff --git a/internal/keymap/dispatch.go b/internal/keymap/dispatch.go index a71d71d..1d0980a 100644 --- a/internal/keymap/dispatch.go +++ b/internal/keymap/dispatch.go @@ -68,7 +68,7 @@ func MatchMain(eng *Engine) (bind inputrc.Bind, command func(), prefix bool) { } // In the main menu, all keys that have been tested against - // the binds will be dropped after command execution (wether + // the binds will be dropped after command execution (whether // or not there's actually a command to execute). if prefix { core.MatchedPrefix(eng.keys, read...) diff --git a/internal/strutil/surround.go b/internal/strutil/surround.go index ce52987..1182a90 100644 --- a/internal/strutil/surround.go +++ b/internal/strutil/surround.go @@ -97,7 +97,7 @@ func AdjustSurroundQuotes(dBpos, dEpos, sBpos, sEpos int) (mark, cpos int) { return } - doubleFirstAndValid := (dBpos < sBpos && // Outtermost + doubleFirstAndValid := (dBpos < sBpos && // Outermost dBpos >= 0 && // Double found sBpos >= 0 && // compared with a found single dEpos > sEpos) // ensuring that we are not comparing unfound