Skip to content

fuzzy matching oddities #33

@dmfay

Description

@dmfay

hi! I'm trying this out after hop and really like it so far, but I've noticed and been able to reproduce a couple of issues with the matcher. Both on this sample text:

hi link @definition Normal
hi link @definition.constant Constant
hi link @definition.function Function
hi link @definition.method Function
hi link @definition.var Normal
hi link @definition.parameter Identifier
hi link @definition.macro Macro
hi link @definition.type Type
hi link @definition.field Todo
hi link @definition.enum Structure
hi link @definition.namespace Define
hi link @definition.import Include
hi link @definition.associated Todo

(extra lines on purpose)

  1. with cursor on an empty line, pounce and search dfnt. All instances of definition match, but the "best" match is on line 8 instead of nearest to the cursor. The line 8 match also ignores the first n and extends out to the t in type; there are other cases in which this could happen (e.g. definition.import), but it doesn't.
    1669086886
  2. with cursor on the last line with text, pounce and search dfnt. Only lines 8 and 13 remain candidates by the last character even though all instances of definition matched above. The extended line 8 match is also evident again.
    1669086868

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions