From b829d71017cd083fe42bc8ee117a1e760cec9acf Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 31 Jan 2022 16:52:43 +0100 Subject: [PATCH] Correctly parse COLORFGBG with three values --- termenv_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termenv_unix.go b/termenv_unix.go index 22553e6..4f439c4 100644 --- a/termenv_unix.go +++ b/termenv_unix.go @@ -74,7 +74,7 @@ func backgroundColor() Color { colorFGBG := os.Getenv("COLORFGBG") if strings.Contains(colorFGBG, ";") { c := strings.Split(colorFGBG, ";") - i, err := strconv.Atoi(c[1]) + i, err := strconv.Atoi(c[len(c)-1]) if err == nil { return ANSIColor(i) }