mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-04 23:37:41 +02:00
prevent flicker from bolding background of selected line
This commit is contained in:
parent
6291c53966
commit
913f17ee3e
@ -24,7 +24,9 @@ Default path for the config file:
|
|||||||
optionsTextColor:
|
optionsTextColor:
|
||||||
- blue
|
- blue
|
||||||
selectedLineBgColor:
|
selectedLineBgColor:
|
||||||
- bold
|
- default
|
||||||
|
selectedRangeBgColor:
|
||||||
|
- blue
|
||||||
commitLength:
|
commitLength:
|
||||||
show: true
|
show: true
|
||||||
mouseEvents: true
|
mouseEvents: true
|
||||||
@ -216,7 +218,7 @@ If you have issues with a light terminal theme where you can't read / see the te
|
|||||||
inactiveBorderColor:
|
inactiveBorderColor:
|
||||||
- black
|
- black
|
||||||
selectedLineBgColor:
|
selectedLineBgColor:
|
||||||
- bold
|
- default
|
||||||
```
|
```
|
||||||
|
|
||||||
## Struggling to see selected line
|
## Struggling to see selected line
|
||||||
@ -228,6 +230,8 @@ If you struggle to see the selected line I recomment using the reverse attribute
|
|||||||
theme:
|
theme:
|
||||||
selectedLineBgColor:
|
selectedLineBgColor:
|
||||||
- reverse
|
- reverse
|
||||||
|
selectedRangeBgColor:
|
||||||
|
- reverse
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example Coloring
|
## Example Coloring
|
||||||
|
@ -120,7 +120,7 @@ func coloredString(colorAttr color.Attribute, str string, selected bool, include
|
|||||||
var cl *color.Color
|
var cl *color.Color
|
||||||
attributes := []color.Attribute{colorAttr}
|
attributes := []color.Attribute{colorAttr}
|
||||||
if selected {
|
if selected {
|
||||||
attributes = append(attributes, theme.SelectedLineBgColor)
|
attributes = append(attributes, theme.SelectedRangeBgColor)
|
||||||
}
|
}
|
||||||
cl = color.New(attributes...)
|
cl = color.New(attributes...)
|
||||||
var clIncluded *color.Color
|
var clIncluded *color.Color
|
||||||
|
@ -256,7 +256,9 @@ func GetDefaultConfig() []byte {
|
|||||||
optionsTextColor:
|
optionsTextColor:
|
||||||
- blue
|
- blue
|
||||||
selectedLineBgColor:
|
selectedLineBgColor:
|
||||||
- bold
|
- default
|
||||||
|
selectedRangeBgColor:
|
||||||
|
- blue
|
||||||
commitLength:
|
commitLength:
|
||||||
show: true
|
show: true
|
||||||
git:
|
git:
|
||||||
|
@ -59,7 +59,7 @@ func (gui *Gui) coloredConflictFile(content string, conflicts []commands.Conflic
|
|||||||
colour := color.New(colourAttr)
|
colour := color.New(colourAttr)
|
||||||
if hasFocus && conflictIndex < len(conflicts) && conflicts[conflictIndex] == conflict && gui.shouldHighlightLine(i, conflict, conflictTop) {
|
if hasFocus && conflictIndex < len(conflicts) && conflicts[conflictIndex] == conflict && gui.shouldHighlightLine(i, conflict, conflictTop) {
|
||||||
colour.Add(color.Bold)
|
colour.Add(color.Bold)
|
||||||
colour.Add(theme.SelectedLineBgColor)
|
colour.Add(theme.SelectedRangeBgColor)
|
||||||
}
|
}
|
||||||
if i == conflict.End && len(remainingConflicts) > 0 {
|
if i == conflict.End && len(remainingConflicts) > 0 {
|
||||||
conflict, remainingConflicts = gui.shiftConflict(remainingConflicts)
|
conflict, remainingConflicts = gui.shiftConflict(remainingConflicts)
|
||||||
|
@ -24,6 +24,9 @@ var (
|
|||||||
// SelectedLineBgColor is the background color for the selected line
|
// SelectedLineBgColor is the background color for the selected line
|
||||||
SelectedLineBgColor color.Attribute
|
SelectedLineBgColor color.Attribute
|
||||||
|
|
||||||
|
// SelectedRangeBgColor is the background color of the selected range of lines
|
||||||
|
SelectedRangeBgColor color.Attribute
|
||||||
|
|
||||||
// GocuiSelectedLineBgColor is the background color for the selected line in gocui
|
// GocuiSelectedLineBgColor is the background color for the selected line in gocui
|
||||||
GocuiSelectedLineBgColor gocui.Attribute
|
GocuiSelectedLineBgColor gocui.Attribute
|
||||||
|
|
||||||
@ -39,6 +42,7 @@ func UpdateTheme(userConfig *viper.Viper) {
|
|||||||
ActiveBorderColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.activeBorderColor"))
|
ActiveBorderColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.activeBorderColor"))
|
||||||
InactiveBorderColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.inactiveBorderColor"))
|
InactiveBorderColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.inactiveBorderColor"))
|
||||||
SelectedLineBgColor = GetBgColor(userConfig.GetStringSlice("gui.theme.selectedLineBgColor"))
|
SelectedLineBgColor = GetBgColor(userConfig.GetStringSlice("gui.theme.selectedLineBgColor"))
|
||||||
|
SelectedRangeBgColor = GetBgColor(userConfig.GetStringSlice("gui.theme.selectedRangeBgColor"))
|
||||||
GocuiSelectedLineBgColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.selectedLineBgColor"))
|
GocuiSelectedLineBgColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.selectedLineBgColor"))
|
||||||
OptionsColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.optionsTextColor"))
|
OptionsColor = GetGocuiColor(userConfig.GetStringSlice("gui.theme.optionsTextColor"))
|
||||||
OptionsFgColor = GetFgColor(userConfig.GetStringSlice("gui.theme.optionsTextColor"))
|
OptionsFgColor = GetFgColor(userConfig.GetStringSlice("gui.theme.optionsTextColor"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user