patch 9.1.1526: completion: search completion match may differ in case

Problem:  completion: search completion match may differ in case
          (techntools)
Solution: add "exacttext" to 'wildoptions' value (Girish Palya)

This flag does the following:

exacttext
      When this flag is present, search pattern completion
      (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
      shows exact buffer text as menu items, without
      preserving regex artifacts like position
      anchors (e.g., |/\<|). This provides more intuitive
      menu items that match the actual buffer text. However,
      searches may be less accurate since the pattern is not
      preserved exactly.
      By default, Vim preserves the typed pattern (with
      anchors) and appends the matched word. This preserves
      search correctness, especially when using regular
      expressions or with 'smartcase' enabled. However, the
      case of the appended matched word may not exactly
      match the case of the word in the buffer.

fixes: #17654
closes: #17667

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Girish Palya
2025-07-08 21:29:02 +02:00
committed by Christian Brabandt
parent b3eaae21b9
commit 93c2d5bf7f
7 changed files with 87 additions and 23 deletions

View File

@ -375,8 +375,9 @@ typedef enum {
// flags for the 'wildoptions' option
// each defined char should be unique over all values.
#define WOP_FUZZY 'z'
#define WOP_TAGFILE 't'
#define WOP_TAGFILE 'g'
#define WOP_PUM 'p'
#define WOP_EXACTTEXT 'x'
// arguments for can_bs()
// each defined char should be unique over all values