Support icon color (#1674)
* Support icon color * Rename variables * Test for readArrays * Add doc and examples for icon color
This commit is contained in:
1 parent
ce12116418
commit
6cabb0e8e4
8 files changed
+490
-43
No files matched your search
@@ -450,8 +450,11 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty
|
||||
// leave space for displaying the tag
|
||||
s = append(s, ' ')
|
||||
|
||||
var icon iconDef
|
||||
|
||||
if gOpts.icons {
|
||||
s = append(s, []rune(dirStyle.icons.get(f))...)
|
||||
icon = dirStyle.icons.get(f)
|
||||
s = append(s, []rune(icon.icon)...)
|
||||
s = append(s, ' ')
|
||||
}
|
||||
|
||||
@@ -497,6 +500,10 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty
|
||||
styledFilename := fmt.Sprintf(cursorescapefmt, string(s))
|
||||
win.print(ui.screen, lnwidth+1, i, st, styledFilename)
|
||||
|
||||
if icon.hasStyle && i != dir.pos {
|
||||
win.print(ui.screen, lnwidth+2, i, icon.style, icon.icon)
|
||||
}
|
||||
|
||||
tag, ok := context.tags[path]
|
||||
if ok {
|
||||
if i == dir.pos {
|
||||
|
||||
Reference in new issue
Block a user