Skip to content

Commit 65d38e0

Browse files
authored
Cosmetics (#122)
1 parent 88a3d6d commit 65d38e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tmux/formater.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ type Formater struct {
110110
// If max is zero, negative or greater than the number of runes in s, truncate
111111
// just returns s.
112112
//
113-
// NOTE: If max is lower than len(ellipsis), in other words it we're not even
113+
// NOTE: If max is lower than len(ellipsis), in other words if we're not even
114114
// allowed to just return the ellipsis string, then we just return the maximum
115-
// number of runes we can, without inserting ellpisis.
115+
// number of runes we can, without inserting ellipsis.
116116
func truncate(s, ellipsis string, max int, dir direction) string {
117117
slen := utf8.RuneCountInString(s)
118118
if max <= 0 || slen <= max {
@@ -144,6 +144,7 @@ func truncate(s, ellipsis string, max int, dir direction) string {
144144
runes = append(runes[:llen], ell...)
145145
runes = append(runes, right...)
146146
}
147+
147148
return string(runes)
148149
}
149150

0 commit comments

Comments
 (0)