Skip to content

Commit a719b0d

Browse files
styling: fix longstanding bug when colouring folders
It's embarassing how long this took me to notice.
1 parent ccd4fdf commit a719b0d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

file-browser.lua

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -803,16 +803,20 @@ local function update_ass()
803803

804804
--sets the selection colour scheme
805805
local multiselected = state.selection[i]
806-
if multiselected then append(style.multiselect)
807-
elseif i == state.selected then append(style.selected) end
808806

809-
--prints the currently-playing icon and style
810-
if playing_file then append( multiselected and style.playing_selected or style.playing) end
807+
--sets the colour for the item
808+
local function set_colour()
809+
if multiselected then append(style.multiselect)
810+
elseif i == state.selected then append(style.selected) end
811+
812+
if playing_file then append( multiselected and style.playing_selected or style.playing) end
813+
end
814+
set_colour()
811815

812816
--sets the folder icon
813817
if v.type == 'dir' then
814818
append(style.folder..o.folder_icon.."\\h"..style.body)
815-
if playing_file then append( multiselected and style.playing_selected or style.playing) end
819+
set_colour()
816820
end
817821

818822
--adds the actual name of the item

0 commit comments

Comments
 (0)