Skip to content

[cpp] matchbrackets is broken when -> is used. #233

Closed

Description

@takamori

If one uses the latest version of CodeMirror, this is broken. In the C++ example, navigate to "Class::Method2" and put the cursor at the end of the line (line 34). The curly brace incorrectly matches to the > in "value->Method3" instead of the end of method.

This likely broke after the following commit for vim which modified the matchbrackets addon:
codemirror/codemirror5@9376ad8

Interestingly, I notice it's not broken in https://codemirror.net/mode/clike/index.html
It's also not broken when google-modes dependencies is set to 5.42.0.

Activity

  1. marijnh commented on Dec 18, 2018

    @marijnh
    Member

    This is a regression in matchbrackets.js, caused by codemirror/codemirror5@9376ad89d . Attached patch (in the CodeMirror repo) fixes it.

  2. takamori commented on Dec 19, 2018

    @takamori
    ContributorAuthor

    Hmm... I still see CodeMirror-nonmatchingbracket applied to an angle bracket where my cursor is after that commit. That doesn't seem right to me; was that your intent?

  3. marijnh commented on Dec 19, 2018

    @marijnh
    Member

    Ah, right, I missed a case. Attached patch should help with that.

  4. added 2 commits that reference this issue on Jan 6, 2020
    9499011
    918ab9e
  5. added a commit that references this issue on Jan 21, 2020
    2e3f6d4
  6. added a commit that references this issue on Sep 5, 2024
    3675309
  7. added a commit that references this issue on Feb 18, 2025
    2f5391f
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions