diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-04-17 16:32:47 +0200 |
|---|---|---|
| committer | Simon Hauser <Simon-Hauser@outlook.de> | 2022-04-17 16:32:47 +0200 |
| commit | 66c3e2a3514a25524106f648b0da494d4031eb69 (patch) | |
| tree | 013a3c4fe2cc3a8fa7da928a1bee6fe9ee7d181c /lua/telescope/pickers.lua | |
| parent | c8ef91a052f55cbfa498eac96df118b1456fe6ed (diff) | |
fix: error if telescope is being opened from command-line window
This is impossible see `:help E11`
Close #1810
Diffstat (limited to 'lua/telescope/pickers.lua')
| -rw-r--r-- | lua/telescope/pickers.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 5548312..9046e7a 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -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 |
