Skip to content

matchdelete call fails when current window is not window associated with id #4178

@myitcv

Description

@myitcv

matchaddpos has the following signature:

matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])

This allows me to add a match in a specific window because the dict argument is defined as follows:

                The optional {dict} argument allows for further custom
                values. Currently this is used to specify a match specific
                conceal character that will be shown for hl-Conceal
                highlighted matches. The dict can have the following members:

                        conceal     Special character to show instead of the
                                    match (only for hl-Conceal highlighted
                                    matches, see :syn-cchar)
                        window      Instead of the current window use the
                                    window with this number or window ID.

The value returned from matchaddpos is an ID which I had assumed was independent of window. But calling matchdelete with a current window of W2, say, passing in an ID that is the result of a call to matchaddpos for window W1, fails with:

E803: ID not found: <ID>

Am I doing something wrong here?

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