mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
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:
parent
f125ffe3e0
commit
49ea26968c
17 changed files with 44 additions and 53 deletions
|
|
@ -6,8 +6,6 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"kitty/tools/utils"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
|
@ -107,7 +105,7 @@ func (e MouseEvent) String() string {
|
|||
}
|
||||
|
||||
func pixel_to_cell(px, length, cell_length int) int {
|
||||
px = utils.Max(0, utils.Min(px, length-1))
|
||||
px = max(0, min(px, length-1))
|
||||
return px / cell_length
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue