fix: always reset prompt highlighting (#2739)

(cherry picked from commit 3a2579e203)
This commit is contained in:
Simon Hauser
2023-10-23 09:45:01 +02:00
committed by Simon Hauser
parent d436fc6c4d
commit 5263cb6021
+4 -4
View File
@@ -460,10 +460,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()
@@ -476,6 +472,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()