diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-06-23 14:46:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-23 14:46:36 +0200 |
commit | 2ccd9980e3424ca80dfb6564883b0abb38564bfd (patch) | |
tree | 9ace69f07c9770c698fce4eeccde3385a7c03348 /pkg/theme | |
parent | cf40a5b077343cf6cf3de50b60fc4b47ce929dc1 (diff) | |
parent | db0a1586d99393cda79e6022f3b3b8b4138b0e8b (diff) |
Fix wrong highlight in staging panel when entering file with only staged changes (#3667)
Reproduction recipe:
1. stage all changes in a file by pressing space on it in the files panel
2. enter the staged changes panel by pressing enter
3. unstage one of the changes
This makes the unstaged changes panel visible, but keeps the focus in
the staged changes panel. However, the highlight in the unstaged changes
view becomes visible, as if it were focused.
Fixes #3664
Diffstat (limited to 'pkg/theme')
-rw-r--r-- | pkg/theme/theme.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/theme/theme.go b/pkg/theme/theme.go index 78be46fb6..acd8ebf71 100644 --- a/pkg/theme/theme.go +++ b/pkg/theme/theme.go @@ -24,11 +24,15 @@ var ( // GocuiSelectedLineBgColor is the background color for the selected line in gocui GocuiSelectedLineBgColor gocui.Attribute + // GocuiInactiveViewSelectedLineBgColor is the background color for the selected line in gocui if the view doesn't have focus + GocuiInactiveViewSelectedLineBgColor gocui.Attribute OptionsColor gocui.Attribute // SelectedLineBgColor is the background color for the selected line SelectedLineBgColor = style.New() + // InactiveViewSelectedLineBgColor is the background color for the selected line if the view doesn't have the focus + InactiveViewSelectedLineBgColor = style.New() // CherryPickedCommitColor is the text style when cherry picking a commit CherryPickedCommitTextStyle = style.New() @@ -49,6 +53,7 @@ func UpdateTheme(themeConfig config.ThemeConfig) { InactiveBorderColor = GetGocuiStyle(themeConfig.InactiveBorderColor) SearchingActiveBorderColor = GetGocuiStyle(themeConfig.SearchingActiveBorderColor) SelectedLineBgColor = GetTextStyle(themeConfig.SelectedLineBgColor, true) + InactiveViewSelectedLineBgColor = GetTextStyle(themeConfig.InactiveViewSelectedLineBgColor, true) cherryPickedCommitBgTextStyle := GetTextStyle(themeConfig.CherryPickedCommitBgColor, true) cherryPickedCommitFgTextStyle := GetTextStyle(themeConfig.CherryPickedCommitFgColor, false) @@ -62,6 +67,7 @@ func UpdateTheme(themeConfig config.ThemeConfig) { UnstagedChangesColor = unstagedChangesTextStyle GocuiSelectedLineBgColor = GetGocuiStyle(themeConfig.SelectedLineBgColor) + GocuiInactiveViewSelectedLineBgColor = GetGocuiStyle(themeConfig.InactiveViewSelectedLineBgColor) OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor) OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false) |