summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers/window.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/pickers/window.lua')
-rw-r--r--lua/telescope/pickers/window.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/lua/telescope/pickers/window.lua b/lua/telescope/pickers/window.lua
new file mode 100644
index 0000000..76c1fe0
--- /dev/null
+++ b/lua/telescope/pickers/window.lua
@@ -0,0 +1,17 @@
+local p_layouts = require('telescope.pickers.layout_strategies')
+
+local p_window = {}
+
+function p_window.get_window_options(picker, max_columns, max_lines)
+ local layout_strategy = picker.layout_strategy
+ local getter = p_layouts[layout_strategy]
+
+ if not getter then
+ error("Not a valid layout strategy: " .. layout_strategy)
+ end
+
+ return getter(picker, max_columns, max_lines)
+end
+
+
+return p_window