From 1d50e9700da096fe5a88671eeba0e658aed2497f Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Fri, 20 Dec 2024 11:43:36 -0500 Subject: [PATCH] docs: add note about cmdline backspace hack --- lua/blink/cmp/lib/cmdline_events.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/blink/cmp/lib/cmdline_events.lua b/lua/blink/cmp/lib/cmdline_events.lua index ee5c6a31..33b994fd 100644 --- a/lua/blink/cmp/lib/cmdline_events.lua +++ b/lua/blink/cmp/lib/cmdline_events.lua @@ -27,6 +27,8 @@ function cmdline_events:listen(opts) -- TextChanged local on_changed = function(key) opts.on_char_added(key, false) end + -- We handle backspace as a special case, because the text will have changed + -- but we still want to fire the CursorMoved event, and not the TextChanged event local did_backspace = false local is_change_queued = false vim.on_key(function(raw_key, escaped_key)