aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Minor <github@pixelverse.org>2021-11-20 22:26:57 -0800
committerJoshua Minor <github@pixelverse.org>2021-11-21 00:28:01 -0800
commit5fe0ad00084c8caaeda8a2c9bcb82da32fdf3a86 (patch)
tree2cb6218c00ec0e8fa7d4047b3a704a886b618472
parent7fcaa2502fdef153b2215bbf35a65c2ae76fa05b (diff)
downloadlite-xl-plugins-5fe0ad00084c8caaeda8a2c9bcb82da32fdf3a86.tar.gz
lite-xl-plugins-5fe0ad00084c8caaeda8a2c9bcb82da32fdf3a86.zip
Double check that TreeView has the color override feature.
-rw-r--r--plugins/gitstatus.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/gitstatus.lua b/plugins/gitstatus.lua
index 4d0cb87..eb925b0 100644
--- a/plugins/gitstatus.lua
+++ b/plugins/gitstatus.lua
@@ -8,6 +8,14 @@ local StatusView = require "core.statusview"
local scan_rate = config.project_scan_rate or 5
+if TreeView then
+ if not (TreeView["set_color_override"] and TreeView["clear_all_color_overrides"]) then
+ -- TreeView doesn't have the color override feature we rely on, so skip it.
+ TreeView = nil
+ end
+end
+
+
local git = {
branch = nil,
inserts = 0,