From 46f584f3a713228fb26d12de378bc2cbb2d315d7 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Wed, 11 Oct 2023 17:52:57 +0200 Subject: [PATCH] fix: always reset prompt highlighting --- lua/telescope/pickers.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index c89ee5fb0c..102bd7af8d 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -605,10 +605,6 @@ function Picker:find() await_schedule() - -- we need to set the prefix color after changing mode since - -- https://github.com/neovim/neovim/commit/cbf9199d65325c1167d7eeb02a34c85d243e781c - self:_reset_prefix_color() - while true do -- Wait for the next input rx.last() @@ -621,6 +617,10 @@ function Picker:find() return end + -- we kinda always wanna reset the color, because of `cc` and `dd` commands, + -- which also delete the prefix and after prefix deletion we need to reapply highlighting + self:_reset_prefix_color() + local start_time = vim.loop.hrtime() local prompt = self:_get_next_filtered_prompt()