hotfix: just only false to disable

I knew i will break it with my last commit
This commit is contained in:
Simon Hauser
2021-07-09 21:00:00 +02:00
parent 3699605627
commit d176dd80da
3 changed files with 4 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ histories.History.__index = histories.History
---@field pre_get function: Will be called before a next or previous item will be returned (optional)
function histories.History:new(opts)
local obj = {}
if not conf.history or type(conf.history) ~= "table" then
if conf.history == false or type(conf.history) ~= "table" then
obj.enabled = false
return setmetatable(obj, self)
end

View File

@@ -40,7 +40,7 @@ end
function action_state.get_current_history()
local history = global_state.get_global_key("history")
if not history then
if not conf.history or type(conf.history) ~= "table" then
if conf.history == false or type(conf.history) ~= "table" then
history = require('telescope.actions.history').get_simple_history()
global_state.set_global_key("history", history)
else