aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-05-09 09:14:43 +0100
committerrxi <rxi@users.noreply.github.com>2020-05-09 09:14:43 +0100
commit35d8cf10354e1da855dc1b0761b2f5ffbb8ed0ac (patch)
treef43938a7ac7c3f8d4ae39fc6de110af9f9e9a66f /plugins
parent4b1fe84a3d5f4ead2856a0c3504c259a7d0becb3 (diff)
downloadlite-xl-plugins-35d8cf10354e1da855dc1b0761b2f5ffbb8ed0ac.tar.gz
lite-xl-plugins-35d8cf10354e1da855dc1b0761b2f5ffbb8ed0ac.zip
Changed `colorpreview` to show no preview rather than a dimmed one on select
Diffstat (limited to 'plugins')
-rw-r--r--plugins/colorpreview.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/colorpreview.lua b/plugins/colorpreview.lua
index 8095f4e..2743f91 100644
--- a/plugins/colorpreview.lua
+++ b/plugins/colorpreview.lua
@@ -24,16 +24,13 @@ local function draw_color_previews(self, idx, x, y, ptn, base)
local oy = self:get_line_text_y_offset()
local text_color = math.max(r, g, b) < 128 and white or black
- tmp[1], tmp[2], tmp[3], tmp[4] = r, g, b, nil
+ tmp[1], tmp[2], tmp[3] = r, g, b
local l1, _, l2, _ = self.doc:get_selection(true)
if not (self.doc:has_selection() and idx >= l1 and idx <= l2) then
renderer.draw_rect(x1, y, x2 - x1, self:get_line_height(), tmp)
renderer.draw_text(self:get_font(), str, x1, y + oy, text_color)
- else
- tmp[4] = 58
- renderer.draw_rect(x1, y, x2 - x1, self:get_line_height(), tmp)
end
end
end