From b081a9aaf84bac98b31066cdaf255ddfbb12b181 Mon Sep 17 00:00:00 2001 From: rsteube Date: Mon, 18 Dec 2023 11:48:48 +0100 Subject: [PATCH] xonsh: reverse style order --- internal/shell/xonsh/style.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/shell/xonsh/style.go b/internal/shell/xonsh/style.go index 8dde20d68..30072cb31 100644 --- a/internal/shell/xonsh/style.go +++ b/internal/shell/xonsh/style.go @@ -10,18 +10,18 @@ func convertStyle(s string) string { xonshStyle := make([]string, 0) style := style.Parse("fg-default bg-default " + s) - switch style.Foreground { + switch style.Background { case nil: - xonshStyle = append(xonshStyle, "fg:default") + xonshStyle = append(xonshStyle, "bg:default") default: - xonshStyle = append(xonshStyle, "fg:"+convertColor(style.Foreground.String())) + xonshStyle = append(xonshStyle, "bg:"+convertColor(style.Background.String())) } - switch style.Background { + switch style.Foreground { case nil: - xonshStyle = append(xonshStyle, "bg:default") + xonshStyle = append(xonshStyle, "fg:default") default: - xonshStyle = append(xonshStyle, "bg:"+convertColor(style.Background.String())) + xonshStyle = append(xonshStyle, "fg:"+convertColor(style.Foreground.String())) } if style.Bold {