summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index aefecf7..6dcc789 100644
--- a/init.lua
+++ b/init.lua
@@ -343,8 +343,13 @@ function craftguide:get_filter_items(data, player)
if not data.items then
data.init_filter_items = filtered_list
end
- elseif filter ~= "" and not datas.searches[filter] then
- datas.searches[filter] = filtered_list
+ elseif filter ~= "" then
+ -- Cache the results only if searched 2 times
+ if datas.searches[filter] == nil then
+ datas.searches[filter] = false
+ else
+ datas.searches[filter] = filtered_list
+ end
end
data.items = filtered_list