Skip to content

Commit

Permalink
Fix typos (#67)
Browse files Browse the repository at this point in the history
Signed-off-by: maxlandon <[email protected]>
Co-authored-by: Andreas Deininger <[email protected]>
  • Loading branch information
maxlandon and deining authored Aug 17, 2024
1 parent f290f1d commit 51a4df8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/completion/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
}
Expand Down
6 changes: 3 additions & 3 deletions internal/core/line.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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()
}
Expand Down
4 changes: 2 additions & 2 deletions internal/core/selection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1209,15 +1209,15 @@ 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,
wantKepos: 12 + 57,
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,
Expand Down
2 changes: 1 addition & 1 deletion internal/keymap/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down
2 changes: 1 addition & 1 deletion internal/strutil/surround.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51a4df8

Please sign in to comment.