Closed tzachar closed 2 years ago
I think we can't support this. In my previous investigation, the wilder.nvim has the same problem.
If you have a solution, Please tell me that.
Do you have any idea what causes this?
Looking at wilder, it seems they solved the problem. This also works for cmp:
diff --git a/lua/cmp/view/custom_entries_view.lua b/lua/cmp/view/custom_entries_view.lua
index d84baee..98aec26 100644
--- a/lua/cmp/view/custom_entries_view.lua
+++ b/lua/cmp/view/custom_entries_view.lua
@@ -177,6 +177,8 @@ custom_entries_view.open = function(self, offset, entries)
else
self:_select(0, { behavior = types.cmp.SelectBehavior.Select })
end
+ local keys = vim.api.nvim_replace_termcodes('<C-R><BS>', true, false, true);
+ vim.api.nvim_feedkeys(keys, 'n', true)
end
custom_entries_view.close = function(self)
Would be better to condition this behaviour on whether the user has incsearch set.
There is still a flicker though.
Thank you for pointing me out it. Hm... It's a bit problematic with nvim-cmp's text changed detection mechanism. I'll consider it.
Hi.
'incsearch' stopped working for me while using cmdline. Using the default config from cmp, this is what I get: cmp.txt