This commit is contained in:
Gokcehan 2020-12-26 21:14:06 +03:00
parent 99d6b7fd44
commit ae79db38da

View File

@ -217,30 +217,30 @@ func parseStylesBSD(env string) styleMap {
return styles return styles
} }
func (cm styleMap) get(f *file) tcell.Style { func (sm styleMap) get(f *file) tcell.Style {
if val, ok := cm[f.path]; ok { if val, ok := sm[f.path]; ok {
return val return val
} }
if f.IsDir() { if f.IsDir() {
if val, ok := cm[f.Name()+"/"]; ok { if val, ok := sm[f.Name()+"/"]; ok {
return val return val
} }
} }
if val, ok := cm[f.Name()]; ok { if val, ok := sm[f.Name()]; ok {
return val return val
} }
if val, ok := cm[f.Name()]; ok { if val, ok := sm[f.Name()]; ok {
return val return val
} }
if val, ok := cm[filepath.Base(f.Name())+".*"]; ok { if val, ok := sm[filepath.Base(f.Name())+".*"]; ok {
return val return val
} }
if val, ok := cm["*"+f.ext]; ok { if val, ok := sm["*"+f.ext]; ok {
return val return val
} }
@ -277,7 +277,7 @@ func (cm styleMap) get(f *file) tcell.Style {
key = "fi" key = "fi"
} }
if val, ok := cm[key]; ok { if val, ok := sm[key]; ok {
return val return val
} }