mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-10-26 15:13:22 +03:00
Fix overrides not being parsed correctly
This commit is contained in:
parent
29a896f9d8
commit
14b58ba015
@ -144,10 +144,12 @@ func highlight_file(path string) (highlighted string, err error) {
|
||||
lexer = chroma.Coalesce(lexer)
|
||||
name := conf.Pygments_style
|
||||
const DEFAULT_LIGHT_THEME = "borland"
|
||||
var style *chroma.Style
|
||||
if name == "default" {
|
||||
DefaultStyle()
|
||||
style = DefaultStyle()
|
||||
} else {
|
||||
style = styles.Get(name)
|
||||
}
|
||||
style := styles.Get(name)
|
||||
if style == nil {
|
||||
if conf.Background.IsDark() && !conf.Foreground.IsDark() {
|
||||
style = styles.Get("monokai")
|
||||
|
@ -106,7 +106,7 @@ func parse_kitten_args(found_extra_args []string, username, hostname_for_match s
|
||||
literal_env = le
|
||||
}
|
||||
} else if key != "hostname" {
|
||||
overrides = append(overrides, key+" "+val)
|
||||
overrides = append(overrides, key+"="+val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,9 @@ func (self *LinesScanner) Err() error {
|
||||
}
|
||||
|
||||
func (self *ConfigParser) ParseOverrides(overrides ...string) error {
|
||||
s := LinesScanner{lines: overrides}
|
||||
s := LinesScanner{lines: utils.Map(func(x string) string {
|
||||
return strings.Replace(x, "=", " ", 1)
|
||||
}, overrides)}
|
||||
self.seen_includes = make(map[string]bool)
|
||||
return self.parse(&s, "<overrides>", utils.ConfigDir(), 0)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user