diff options
Diffstat (limited to 'lua/telescope/state.lua')
| -rw-r--r-- | lua/telescope/state.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/telescope/state.lua b/lua/telescope/state.lua new file mode 100644 index 0000000..0ae31dd --- /dev/null +++ b/lua/telescope/state.lua @@ -0,0 +1,18 @@ +local state = {} + +state._statuses = {} + +--- Set the status for a particular prompt bufnr +function state.set_status(prompt_bufnr, status) + state._statuses[prompt_bufnr] = status +end + +function state.get_status(prompt_bufnr) + return state._statuses[prompt_bufnr] or {} +end + +function state.clear_status(prompt_bufnr) + state.set_status(prompt_bufnr, nil) +end + +return state |
