From cb36e87b80f92b7f822538b33e293fc4cdc214a2 Mon Sep 17 00:00:00 2001 From: Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> Date: Tue, 2 Jul 2019 05:43:53 -0400 Subject: [PATCH] Use symlink color for directories (#195) Resolves https://github.com/gokcehan/lf/issues/156 --- colors.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/colors.go b/colors.go index ab616b5..a976831 100644 --- a/colors.go +++ b/colors.go @@ -199,6 +199,10 @@ func (cm colorMap) get(f *file) (termbox.Attribute, termbox.Attribute) { var key string switch { + case f.linkState == working: + key = "ln" + case f.linkState == broken: + key = "or" case f.IsDir() && f.Mode()&os.ModeSticky != 0 && f.Mode()&0002 != 0: key = "tw" case f.IsDir() && f.Mode()&os.ModeSticky != 0: @@ -207,10 +211,6 @@ func (cm colorMap) get(f *file) (termbox.Attribute, termbox.Attribute) { key = "ow" case f.IsDir(): key = "di" - case f.linkState == working: - key = "ln" - case f.linkState == broken: - key = "or" case f.Mode()&os.ModeNamedPipe != 0: key = "pi" case f.Mode()&os.ModeSocket != 0: