Skip to content

Fuzzy completion may be affected by set complete-=i #15296

Description

@roccomao

Steps to reproduce

  1. vim -u NONE -U NONE
  2. input: hello helio hero test_h another_h
  3. set completeopt+=fuzzy
  4. enter h, then press <C-n>, both five words will appear in the candidate list
  5. set completeopt+=longest
  6. repeat step 4, now :
    1. only hello helio hero will appear in the candidate list
    2. h was completed to the longest match he by default
    3. Note: After adding set completeopt+=longest, these two behaviors are what I expected. I don't know if it was the author's original intention because test_h and another_h disappear.
  7. set complete-=i
  8. repeat step 4, now the hello is the only match

Expected behaviour

When set completeopt+=longest,fuzzy and set complete-=i, if we enter h, then press <C-n>, the current result of step 6 is what I expected, as follows:

  1. h was completed to the longest match he by default when press <C-n>, which is the effect of longest
  2. test_h and another_h no longer appear in the candidate list, only words starting with h can appear in the candidate list

Version of Vim

9.1.0598

Environment

The bug was introduced by patch 9.1.0598

Logs and stack traces

No response

Activity

  1. added a commit that references this issue on Mar 6, 2025
    f31cfa2
  2. added 9 commits that reference this issue on Mar 7, 2025
    510d575
    f6b5613
    1deb4af
    5b3fa37
    5807339
    160c0c9
    e997e0c
    5b9ba18
    3f586c6
  3. added 6 commits that reference this issue on Mar 21, 2025
    58c1140
    0e53cf5
    c533f86
    9a24104
    fa96502
    90d59e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions