summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2021-07-09 21:00:00 +0200
committerSimon Hauser <Simon-Hauser@outlook.de>2021-07-09 21:00:00 +0200
commitd176dd80da1c07c25fd23ad8f934b6055b10889b (patch)
tree10bff01b0f41f94a0a3242a4710de9c50b0717e7 /lua
parent36996056272a7174868367acf1043cead333d115 (diff)
hotfix: just only false to disable
I knew i will break it with my last commit
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/actions/history.lua2
-rw-r--r--lua/telescope/actions/state.lua2
-rw-r--r--lua/telescope/config.lua4
3 files changed, 4 insertions, 4 deletions
diff --git a/lua/telescope/actions/history.lua b/lua/telescope/actions/history.lua
index 8ec58e2..48a24ca 100644
--- a/lua/telescope/actions/history.lua
+++ b/lua/telescope/actions/history.lua
@@ -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
diff --git a/lua/telescope/actions/state.lua b/lua/telescope/actions/state.lua
index 8470f2d..192c44d 100644
--- a/lua/telescope/actions/state.lua
+++ b/lua/telescope/actions/state.lua
@@ -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
diff --git a/lua/telescope/config.lua b/lua/telescope/config.lua
index 00d4101..e5a3ead 100644
--- a/lua/telescope/config.lua
+++ b/lua/telescope/config.lua
@@ -222,7 +222,7 @@ local telescope_defaults = {
}, [[
This field handles the configuration for prompt history.
By default it is a table, with default values (more below).
- To disable history, set it to either false or nil.
+ To disable history, set it to false.
Currently mappings still need to be added, Example:
mappings = {
@@ -381,7 +381,7 @@ function config.set_defaults(user_defaults, tele_defaults)
)
end
if name == "history" then
- if not user_defaults[name] or not config.values[name] then
+ if user_defaults[name] == false or config.values[name] == false then
return false
end