From 73faa10b4acc18228accfcf20e22d36228eb0cb3 Mon Sep 17 00:00:00 2001 From: Joshua Minor Date: Sat, 20 Nov 2021 23:09:02 -0800 Subject: Color every parent folder of each changed file. --- plugins/gitstatus.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/gitstatus.lua b/plugins/gitstatus.lua index eb925b0..54bd6e8 100644 --- a/plugins/gitstatus.lua +++ b/plugins/gitstatus.lua @@ -70,7 +70,13 @@ core.add_thread(function() deletes = deletes + (tonumber(dels) or 0) local abs_path = core.project_dir.."/"..root..path if TreeView then - TreeView:set_color_override(abs_path, style.gitstatus_modification) + -- Color this file, and each parent folder, + -- so you can see at a glance which folders + -- have modified files in them. + while abs_path do + TreeView:set_color_override(abs_path, style.gitstatus_modification) + abs_path = common.dirname(abs_path) + end end end end -- cgit v1.2.3