From 66c3e2a3514a25524106f648b0da494d4031eb69 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Sun, 17 Apr 2022 16:32:47 +0200 Subject: [PATCH] fix: error if telescope is being opened from command-line window This is impossible see `:help E11` Close #1810 --- lua/telescope/pickers.lua | 4 ++++ 1 file changed, 4 insertions(+) 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