mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 10:13:41 -05:00
Bump github.com/gookit/color from 1.6.0 to 1.6.1
Bumps [github.com/gookit/color](https://github.com/gookit/color) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/gookit/color/releases) - [Commits](https://github.com/gookit/color/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/gookit/color dependency-version: 1.6.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
@@ -15,7 +15,7 @@ require (
|
||||
github.com/creack/pty v1.1.24
|
||||
github.com/gdamore/tcell/v3 v3.3.0
|
||||
github.com/go-errors/errors v1.5.1
|
||||
github.com/gookit/color v1.6.0
|
||||
github.com/gookit/color v1.6.1
|
||||
github.com/integrii/flaggy v1.8.0
|
||||
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c
|
||||
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5
|
||||
|
||||
@@ -44,8 +44,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/gookit/assert v0.1.1 h1:lh3GcawXe/p+cU7ESTZ5Ui3Sm/x8JWpIis4/1aF0mY0=
|
||||
github.com/gookit/assert v0.1.1/go.mod h1:jS5bmIVQZTIwk42uXl4lyj4iaaxx32tqH16CFj0VX2E=
|
||||
github.com/gookit/color v1.6.0 h1:JjJXBTk1ETNyqyilJhkTXJYYigHG24TM9Xa2M1xAhRA=
|
||||
github.com/gookit/color v1.6.0/go.mod h1:9ACFc7/1IpHGBW8RwuDm/0YEnhg3dwwXpoMsmtyHfjs=
|
||||
github.com/gookit/color v1.6.1 h1:KoTnDxJPRgrL0SoX0f8rCFg2zI0t4E3GZZBMo2nN8LU=
|
||||
github.com/gookit/color v1.6.1/go.mod h1:9ACFc7/1IpHGBW8RwuDm/0YEnhg3dwwXpoMsmtyHfjs=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/integrii/flaggy v1.8.0 h1:tC1qWwg4fhF2Qdaj+MpPK04cxlOSq0+HoMZqAW6Arao=
|
||||
|
||||
+1
@@ -19,3 +19,4 @@
|
||||
.DS_Store
|
||||
app
|
||||
demo
|
||||
.xenv.toml
|
||||
+7
-2
@@ -227,8 +227,13 @@ func RenderString(code string, str string) string {
|
||||
return ClearCode(str)
|
||||
}
|
||||
|
||||
// return fmt.Sprintf(FullColorTpl, code, str)
|
||||
return StartSet + code + "m" + str + ResetSet
|
||||
open := StartSet + code + "m"
|
||||
// If the string contains reset sequences, re-apply our color after each
|
||||
// reset so that nested colored args don't break the outer color.
|
||||
if strings.Contains(str, ResetSet) {
|
||||
str = strings.ReplaceAll(str, ResetSet, ResetSet+open)
|
||||
}
|
||||
return open + str + ResetSet
|
||||
}
|
||||
|
||||
// ClearCode clear color codes.
|
||||
|
||||
+3
-3
@@ -767,15 +767,15 @@ func RgbStrToHsl(rgbStr string) []float64 {
|
||||
}
|
||||
|
||||
r, e1 := strconv.ParseInt(strings.TrimSpace(rgbVals[0]), 10, 0)
|
||||
if e1 != nil {
|
||||
if e1 != nil || r < 0 || r > 255 {
|
||||
return nil
|
||||
}
|
||||
g, e2 := strconv.ParseInt(strings.TrimSpace(rgbVals[1]), 10, 0)
|
||||
if e2 != nil {
|
||||
if e2 != nil || g < 0 || g > 255 {
|
||||
return nil
|
||||
}
|
||||
b, e3 := strconv.ParseInt(strings.TrimSpace(rgbVals[2]), 10, 0)
|
||||
if e3 != nil {
|
||||
if e3 != nil || b < 0 || b > 255 {
|
||||
return nil
|
||||
}
|
||||
return RgbToHsl(uint8(r), uint8(g), uint8(b))
|
||||
|
||||
+3
-6
@@ -30,11 +30,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
// if support color 16+, don't need to enable VTP
|
||||
if colorLevel > Level16 {
|
||||
return
|
||||
}
|
||||
if !Enable { // disable color
|
||||
// needVTP=false OR Enable=false: Don't need to enable virtual process
|
||||
if !needVTP || !Enable {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -146,7 +143,7 @@ func detectSpecialTermColor(termVal string) (tl Level, needVTP bool) {
|
||||
}
|
||||
|
||||
// Windows 10 build 14931 is the first release that supports 16m/TrueColor
|
||||
debugf("support True Color on windows version is >= build 14931")
|
||||
debugf("support True Color on windows version >= 14931, needVTP=true")
|
||||
return LevelRgb, true
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -63,7 +63,7 @@ github.com/go-errors/errors
|
||||
github.com/go-logfmt/logfmt
|
||||
# github.com/google/go-cmp v0.7.0
|
||||
## explicit; go 1.21
|
||||
# github.com/gookit/color v1.6.0
|
||||
# github.com/gookit/color v1.6.1
|
||||
## explicit; go 1.18
|
||||
github.com/gookit/color
|
||||
# github.com/hpcloud/tail v1.0.0
|
||||
|
||||
Reference in New Issue
Block a user