Use stdlib maps/slices

This commit is contained in:
Kovid Goyal
2024-05-04 14:34:40 +05:30
parent 4998fe66b9
commit e1b367e1b3
27 changed files with 55 additions and 60 deletions

View File

@@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"math/rand/v2"
"slices"
"strings"
"time"
@@ -16,7 +17,6 @@ import (
"kitty/tools/tui/loop"
"kitty/tools/utils"
"golang.org/x/exp/slices"
"golang.org/x/sys/unix"
)

View File

@@ -11,8 +11,6 @@ import (
"kitty/tools/utils"
"kitty/tools/utils/style"
"kitty/tools/wcswidth"
"golang.org/x/exp/maps"
)
var _ = fmt.Print
@@ -277,7 +275,7 @@ func (h *handler) on_wakeup() (err error) {
switch h.state {
case SCANNING_FAMILIES:
h.state = LISTING_FAMILIES
h.family_list.UpdateFamilies(utils.StableSortWithKey(maps.Keys(h.fonts), strings.ToLower))
h.family_list.UpdateFamilies(utils.StableSortWithKey(utils.Keys(h.fonts), strings.ToLower))
case LISTING_FAMILIES:
}
return h.draw_screen()