mirror of
https://github.com/zyedidia/micro.git
synced 2024-09-11 04:05:38 +03:00
Add statusline.inactive and statusline.suggestions color groups (#1832)
Add color groups for displaying statuslines of inactive split panes and the suggestions menu with colors different from the statusline of the active pane.
This commit is contained in:
parent
b16af564a7
commit
dda79ca70e
@ -260,7 +260,9 @@ func (i *InfoWindow) Display() {
|
||||
done := false
|
||||
|
||||
statusLineStyle := config.DefStyle.Reverse(true)
|
||||
if style, ok := config.Colorscheme["statusline"]; ok {
|
||||
if style, ok := config.Colorscheme["statusline.suggestions"]; ok {
|
||||
statusLineStyle = style
|
||||
} else if style, ok := config.Colorscheme["statusline"]; ok {
|
||||
statusLineStyle = style
|
||||
}
|
||||
keymenuOffset := 0
|
||||
|
@ -110,7 +110,9 @@ func (s *StatusLine) Display() {
|
||||
// autocomplete suggestions (for the buffer, not for the infowindow)
|
||||
if b.HasSuggestions && len(b.Suggestions) > 1 {
|
||||
statusLineStyle := config.DefStyle.Reverse(true)
|
||||
if style, ok := config.Colorscheme["statusline"]; ok {
|
||||
if style, ok := config.Colorscheme["statusline.suggestions"]; ok {
|
||||
statusLineStyle = style
|
||||
} else if style, ok := config.Colorscheme["statusline"]; ok {
|
||||
statusLineStyle = style
|
||||
}
|
||||
x := 0
|
||||
@ -167,8 +169,16 @@ func (s *StatusLine) Display() {
|
||||
rightText = formatParser.ReplaceAllFunc(rightText, formatter)
|
||||
|
||||
statusLineStyle := config.DefStyle.Reverse(true)
|
||||
if style, ok := config.Colorscheme["statusline"]; ok {
|
||||
statusLineStyle = style
|
||||
if s.win.IsActive() {
|
||||
if style, ok := config.Colorscheme["statusline"]; ok {
|
||||
statusLineStyle = style
|
||||
}
|
||||
} else {
|
||||
if style, ok := config.Colorscheme["statusline.inactive"]; ok {
|
||||
statusLineStyle = style
|
||||
} else if style, ok := config.Colorscheme["statusline"]; ok {
|
||||
statusLineStyle = style
|
||||
}
|
||||
}
|
||||
|
||||
leftLen := util.StringWidth(leftText, util.CharacterCount(leftText), 1)
|
||||
|
Loading…
Reference in New Issue
Block a user