From e43efc389e2ae76bd9baa0cad9b8140e77646765 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Tue, 22 Sep 2020 12:50:03 -0400 Subject: [PATCH] fix: Don't pass anything if word match is empty --- lua/telescope/builtin.lua | 2 +- lua/telescope/pickers.lua | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/telescope/builtin.lua b/lua/telescope/builtin.lua index d1a8f08..5264ca3 100644 --- a/lua/telescope/builtin.lua +++ b/lua/telescope/builtin.lua @@ -345,7 +345,7 @@ builtin.grep_string = function(opts) local search = opts.search or vim.fn.expand("") opts.entry_maker = opts.entry_maker or make_entry.gen_from_vimgrep(opts) - opts.word_match = opts.word_match or '' + opts.word_match = opts.word_match or nil pickers.new(opts, { prompt = 'Find Word', diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index a321858..ef75b7f 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -296,9 +296,8 @@ function Picker:find() -- TODO: We need to center this and make it prettier... local prompt_win, prompt_opts = popup.create('', popup_opts.prompt) local prompt_bufnr = a.nvim_win_get_buf(prompt_win) - a.nvim_win_set_option(prompt_win, 'winblend', self.window.winblend) - a.nvim_win_set_option(prompt_win, 'winhl', 'Normal:TelescopeNormal') + a.nvim_win_set_option(prompt_win, 'winblend', self.window.winblend) -- a.nvim_buf_set_option(prompt_bufnr, 'buftype', 'prompt') -- vim.fn.prompt_setprompt(prompt_bufnr, prompt_string)