diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-11-16 10:58:30 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-16 10:58:30 -0500 |
| commit | 985856946e30a7d93eb3b8aac6b5b5d7d589a768 (patch) | |
| tree | 0e334d5dd1808f6508c869322699825d2b576130 /lua/telescope/state.lua | |
| parent | ad7280e0b99ecd9f78ac6c70b4e5b49ed5e632f8 (diff) | |
feat: Allow overriding actions from mappings (#248)
Diffstat (limited to 'lua/telescope/state.lua')
| -rw-r--r-- | lua/telescope/state.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/telescope/state.lua b/lua/telescope/state.lua index a014a0d..6a06eb1 100644 --- a/lua/telescope/state.lua +++ b/lua/telescope/state.lua @@ -1,12 +1,21 @@ local state = {} TelescopeGlobalState = TelescopeGlobalState or {} +TelescopeGlobalState.global = TelescopeGlobalState.global or {} --- Set the status for a particular prompt bufnr function state.set_status(prompt_bufnr, status) TelescopeGlobalState[prompt_bufnr] = status end +function state.set_global_key(key, value) + TelescopeGlobalState.global[key] = value +end + +function state.get_global_key(key) + return TelescopeGlobalState.global[key] +end + function state.get_status(prompt_bufnr) return TelescopeGlobalState[prompt_bufnr] or {} end |
