aboutsummaryrefslogtreecommitdiff
path: root/plugins/nonicons.lua
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-03-07 17:37:21 -0400
committerjgmdev <jgmdev@gmail.com>2022-03-07 17:37:21 -0400
commit85367c07b857c5ad0251f6387939657541340fd7 (patch)
tree9e5fd1345b60e82962ed3f39a86bf675d8e9b664 /plugins/nonicons.lua
parent8ec16dd695c1a6750695b087f56e329f3b8f823e (diff)
downloadlite-xl-plugins-85367c07b857c5ad0251f6387939657541340fd7.tar.gz
lite-xl-plugins-85367c07b857c5ad0251f6387939657541340fd7.zip
nonicons: don't perform drawing if TreeView is not visible.
Diffstat (limited to 'plugins/nonicons.lua')
-rw-r--r--plugins/nonicons.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/nonicons.lua b/plugins/nonicons.lua
index b207d58..3dd0957 100644
--- a/plugins/nonicons.lua
+++ b/plugins/nonicons.lua
@@ -39,7 +39,7 @@ local extension_icons = {
[".swift"] = { "#e37933", "" },
[".ts"] = { "#519aba", "" }, -- TypeScript
[".elm"] = { "#519aba", "" },
- [".diff"] = { "#41535b", "" },
+ [".diff"] = { "#41535b", "" }, [".patch"] = { "#41535b", "" },
[".ex"] = { "#a074c4", "" }, [".exs"] = { "#a074c4", "" }, -- Elixir
-- Following without special icon:
[".awk"] = { "#4d5a5e", "" },
@@ -68,6 +68,7 @@ end
-- Replace original draw
function TreeView:draw()
+ if not self.visible then return end
self:draw_background(style.background2)
local icon_width = icon_font:get_width("")