Skip to content

8.0.0201 changed synIDattr behavior for cleared groups #1592

@godlygeek

Description

@godlygeek

Prior to patch 8.0.0201, synIDattr could be called on cleared highlight groups and would give sane results (name would be filled in; other attributes would return -1 or "").

After 8.0.0201, calling synIDattr on a cleared highlight group returns attributes for an entirely different group (the next non-cleared one).

Test case:

vim -u NONE -N \
    --cmd 'syn on' \
    --cmd 'hi clear Normal' \
    --cmd 'echomsg synIDattr(hlID("Normal"), "name")' \
    --cmd q

Prior to 8.0.0201, this would return "Normal", but after 8.0.0201 it incorrectly returns "Comment".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions