aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2022-06-13 23:47:17 +0200
committerGuldoman <giulio.lettieri@gmail.com>2022-06-13 23:47:17 +0200
commit15b2e6465e263e7ada1e600d6de4dc719f9d837f (patch)
tree67b36041b4c90fe014a0a45a59a33cabf0138438
parentce6fb751afdb311f3a3fd2d02ca6e472361074b0 (diff)
downloadlite-xl-plugins-15b2e6465e263e7ada1e600d6de4dc719f9d837f.tar.gz
lite-xl-plugins-15b2e6465e263e7ada1e600d6de4dc719f9d837f.zip
`minimap`: don't crash with colors with invalid alpha
-rw-r--r--plugins/minimap.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/minimap.lua b/plugins/minimap.lua
index fd48a51..e039e13 100644
--- a/plugins/minimap.lua
+++ b/plugins/minimap.lua
@@ -532,7 +532,7 @@ DocView.draw_scrollbar = function(self)
color = style.syntax[type]
if config.plugins.minimap.syntax_highlight and color ~= nil then
-- fetch and dim colors
- color = {color[1], color[2], color[3], color[4] * 0.5}
+ color = {color[1], color[2], color[3], (color[4] or 255) * 0.5}
else
color = old_color
end