summaryrefslogtreecommitdiff
path: root/lua/telescope/state.lua
blob: 8399c05fa02257a737d62b3610ee3c1d3b9c9d71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local state = {}

TelescopeGlobalState = TelescopeGlobalState or {}

--- Set the status for a particular prompt bufnr
function state.set_status(prompt_bufnr, status)
  TelescopeGlobalState[prompt_bufnr] = status
end

function state.get_status(prompt_bufnr)
  return TelescopeGlobalState[prompt_bufnr] or {}
end

function state.clear_status(prompt_bufnr)
  state.set_status(prompt_bufnr, nil)
end

return state