From 15d31fe7a6c875eae82a2721941080586d89e876 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 9 May 2025 06:30:59 +0800 Subject: vim-patch:9.1.1374: completion: 'smartcase' not respected when filtering matches Problem: Currently, 'smartcase' is respected when completing keywords using , , , and . However, when a user continues typing and the completion menu is filtered using cached matches, 'smartcase' is not applied. This leads to poor-quality or irrelevant completion suggestions, as shown in the example below. Solution: When filtering cached completion items after typing additional characters, apply case-sensitive comparison if 'smartcase' is enabled and the typed pattern includes uppercase characters. This ensures consistent and expected completion behavior. (Girish Palya) closes: vim/vim#17271 https://github.com/vim/vim/commit/dc314053e121b0a995bdfbcdd2f03ce228e14eb3 Co-authored-by: Girish Palya --- runtime/lua/vim/_meta/options.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 7898773cb4..bc22d2f047 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -6084,9 +6084,11 @@ vim.wo.scl = vim.wo.signcolumn --- Override the 'ignorecase' option if the search pattern contains upper --- case characters. Only used when the search pattern is typed and --- 'ignorecase' option is on. Used for the commands "/", "?", "n", "N", ---- ":g" and ":s". Not used for "*", "#", "gd", tag search, etc. After ---- "*" and "#" you can make 'smartcase' used by doing a "/" command, ---- recalling the search pattern from history and hitting . +--- ":g" and ":s" and when filtering matches for the completion menu +--- `compl-states`. +--- Not used for "*", "#", "gd", tag search, etc. After "*" and "#" you +--- can make 'smartcase' used by doing a "/" command, recalling the search +--- pattern from history and hitting . --- --- @type boolean vim.o.smartcase = false -- cgit