match trailing slash as dirs in colors/icons

Related #505 #506
This commit is contained in:
Gokcehan committed 2020-12-24 01:04:13 +03:00
1 parent 1aed76c10d
commit de691bf4e8
2 files changed
+16

No files matched your search

+10
View File
@@ -197,6 +197,16 @@ func (cm styleMap) get(f *file) tcell.Style {
return val
}
if f.IsDir() {
if val, ok := cm[f.Name()+"/"]; ok {
return val
}
}
if val, ok := cm[f.Name()]; ok {
return val
}
if val, ok := cm[f.Name()]; ok {
return val
}
+6
View File
@@ -50,6 +50,12 @@ func (im iconMap) get(f *file) string {
return val
}
if f.IsDir() {
if val, ok := im[f.Name()+"/"]; ok {
return val
}
}
if val, ok := im[f.Name()]; ok {
return val
}