fix: error if telescope is being opened from command-line window

This is impossible see `:help E11`
Close #1810
This commit is contained in:
Simon Hauser
2022-04-17 16:32:47 +02:00
parent c8ef91a052
commit 66c3e2a351

View File

@@ -51,6 +51,10 @@ function Picker:new(opts)
error "layout_strategy and get_window_options are not compatible keys"
end
if vim.fn.win_gettype() == "command" then
error "Can't open telescope from command-line window. See E11"
end
deprecated.options(opts)
-- We need to clear at the beginning not on close because after close we can still have select:post