Bump go version to 1.21

Allows us to use the much faster builtin min/max functions
for two variable min/max
This commit is contained in:
Kovid Goyal
2023-08-09 11:58:16 +05:30
parent f125ffe3e0
commit 49ea26968c
17 changed files with 44 additions and 53 deletions

View File

@@ -4,7 +4,6 @@ package wcswidth
import (
"fmt"
"kitty/tools/utils"
)
var _ = fmt.Print
@@ -124,7 +123,7 @@ func (self *CellIterator) Backward() (has_more bool) {
for self.Forward() {
cells = append(cells, self.current)
}
ri.pos = utils.Min(utils.Max(-1, current_cell_num-1), len(cells))
ri.pos = min(max(-1, current_cell_num-1), len(cells))
ri.cells = cells
}
if ri.pos > -1 {