mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
color fixups
This commit is contained in:
parent
123d624141
commit
d626bcac00
10 changed files with 28 additions and 27 deletions
|
@ -118,15 +118,16 @@ func coloredString(textStyle style.TextStyle, str string, selected bool, include
|
|||
textStyle = textStyle.MergeStyle(theme.SelectedRangeBgColor)
|
||||
}
|
||||
|
||||
if len(str) < 2 {
|
||||
return textStyle.Sprint(str)
|
||||
firstCharStyle := textStyle
|
||||
if included {
|
||||
firstCharStyle = firstCharStyle.MergeStyle(style.BgGreen)
|
||||
}
|
||||
|
||||
res := textStyle.Sprint(str[:1])
|
||||
if included {
|
||||
return res + textStyle.MergeStyle(style.BgGreen).Sprint(str[1:])
|
||||
if len(str) < 2 {
|
||||
return firstCharStyle.Sprint(str)
|
||||
}
|
||||
return res + textStyle.Sprint(str[1:])
|
||||
|
||||
return firstCharStyle.Sprint(str[:1]) + textStyle.Sprint(str[1:])
|
||||
}
|
||||
|
||||
func parsePatch(patch string) ([]int, []int, []*PatchLine) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue