summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go11
-rw-r--r--vendor/modules.txt2
4 files changed, 9 insertions, 10 deletions
diff --git a/go.mod b/go.mod
index c4934676e..0ed9f26d7 100644
--- a/go.mod
+++ b/go.mod
@@ -20,7 +20,7 @@ require (
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4
github.com/jesseduffield/gocui v0.3.1-0.20221003162644-fead10f7b360
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10
- github.com/jesseduffield/lazycore v0.0.0-20221009152330-3297d5700785
+ github.com/jesseduffield/lazycore v0.0.0-20221009164442-17c8b878c316
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
github.com/jesseduffield/yaml v2.1.0+incompatible
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
diff --git a/go.sum b/go.sum
index 1f4738107..1e44c8b41 100644
--- a/go.sum
+++ b/go.sum
@@ -76,8 +76,8 @@ github.com/jesseduffield/gocui v0.3.1-0.20221003162644-fead10f7b360 h1:43F6SAmNz
github.com/jesseduffield/gocui v0.3.1-0.20221003162644-fead10f7b360/go.mod h1:znJuCDnF2Ph40YZSlBwdX/4GEofnIoWLGdT4mK5zRAU=
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10 h1:jmpr7KpX2+2GRiE91zTgfq49QvgiqB0nbmlwZ8UnOx0=
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10/go.mod h1:aA97kHeNA+sj2Hbki0pvLslmE4CbDyhBeSSTUUnOuVo=
-github.com/jesseduffield/lazycore v0.0.0-20221009152330-3297d5700785 h1:o/XeosR2/jQgJPHjRuFABHFiXn51DsH35egR1h1ggo0=
-github.com/jesseduffield/lazycore v0.0.0-20221009152330-3297d5700785/go.mod h1:m8oQ2wqlXm/sFuDGuKTaX2BNsRJ+nW76J7vetOoMr0o=
+github.com/jesseduffield/lazycore v0.0.0-20221009164442-17c8b878c316 h1:UzTg0utG+cLS94Qjb/ZFDzfMeZDFXErSbNgJOyj70EA=
+github.com/jesseduffield/lazycore v0.0.0-20221009164442-17c8b878c316/go.mod h1:qxN4mHOAyeIDLP7IK7defgPClM/z1Kze8VVQiaEjzsQ=
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e h1:uw/oo+kg7t/oeMs6sqlAwr85ND/9cpO3up3VxphxY0U=
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e/go.mod h1:u60qdFGXRd36jyEXxetz0vQceQIxzI13lIo3EFUDf4I=
github.com/jesseduffield/yaml v2.1.0+incompatible h1:HWQJ1gIv2zHKbDYNp0Jwjlj24K8aqpFHnMCynY1EpmE=
diff --git a/vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go b/vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go
index 7cacfff98..c516cbba7 100644
--- a/vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go
+++ b/vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go
@@ -1,7 +1,6 @@
package boxlayout
import (
- "github.com/jesseduffield/generics/slices"
"github.com/jesseduffield/lazycore/pkg/utils"
"github.com/samber/lo"
)
@@ -95,7 +94,7 @@ func ArrangeWindows(root *Box, x0, y0, width, height int) map[string]Dimensions
}
func calcSizes(boxes []*Box, availableSpace int) []int {
- normalizedWeights := normalizeWeights(slices.Map(boxes, func(box *Box) int { return box.Weight }))
+ normalizedWeights := normalizeWeights(lo.Map(boxes, func(box *Box, _ int) int { return box.Weight }))
totalWeight := 0
reservedSpace := 0
@@ -152,13 +151,13 @@ func normalizeWeights(weights []int) []int {
}
// to spare us some computation we'll exit early if any of our weights is 1
- if slices.Some(weights, func(weight int) bool { return weight == 1 }) {
+ if lo.SomeBy(weights, func(weight int) bool { return weight == 1 }) {
return weights
}
// map weights to factorSlices and find the lowest common factor
- positiveWeights := slices.Filter(weights, func(weight int) bool { return weight > 0 })
- factorSlices := slices.Map(positiveWeights, func(weight int) []int { return calcFactors(weight) })
+ positiveWeights := lo.Filter(weights, func(weight int, _ int) bool { return weight > 0 })
+ factorSlices := lo.Map(positiveWeights, func(weight int, _ int) []int { return calcFactors(weight) })
commonFactors := factorSlices[0]
for _, factors := range factorSlices {
commonFactors = lo.Intersect(commonFactors, factors)
@@ -168,7 +167,7 @@ func normalizeWeights(weights []int) []int {
return weights
}
- newWeights := slices.Map(weights, func(weight int) int { return weight / commonFactors[0] })
+ newWeights := lo.Map(weights, func(weight int, _ int) int { return weight / commonFactors[0] })
return normalizeWeights(newWeights)
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 68ac0e4a0..97c89ac60 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -178,7 +178,7 @@ github.com/jesseduffield/gocui
# github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10
## explicit; go 1.18
github.com/jesseduffield/kill
-# github.com/jesseduffield/lazycore v0.0.0-20221009152330-3297d5700785
+# github.com/jesseduffield/lazycore v0.0.0-20221009164442-17c8b878c316
## explicit; go 1.18
github.com/jesseduffield/lazycore/pkg/boxlayout
github.com/jesseduffield/lazycore/pkg/utils