aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJefferson González <jgmdev@gmail.com>2022-03-07 18:53:48 -0400
committerGitHub <noreply@github.com>2022-03-07 18:53:48 -0400
commit888c6545ba174f2ca08f9371578208dc46f1709d (patch)
tree9e5fd1345b60e82962ed3f39a86bf675d8e9b664
parent8ec16dd695c1a6750695b087f56e329f3b8f823e (diff)
parent85367c07b857c5ad0251f6387939657541340fd7 (diff)
downloadlite-xl-plugins-888c6545ba174f2ca08f9371578208dc46f1709d.tar.gz
lite-xl-plugins-888c6545ba174f2ca08f9371578208dc46f1709d.zip
Merge pull request #41 from jgmdev/nonicons-fix
nonicons: don't perform drawing if TreeView is not visible.
-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("")