Skip to content

Indent auto-close-brackets support causes strange behaviour when closing bracket after caret but no opening bracket before #138

Closed

Description

@WebCoder49

Tested in Firefox:

  • hello|CARET|) then Enter creates hell|CARET|o(newline))
  • (hi|CARET|) then Enter creates (h|CARET|i(newline))
  • (h|CARET|) then Enter creates (|CARET|h(newline))
  • |CARET|) then Enter creates )|CARET|

All should create the initial text, but with a newline then caret where the caret used to be.

Activity

  1. added
    bugSomething isn't working
    area:existing-pluginA bug/feature for an existing plugin in the plugins folder of code-input.
    on Jul 15, 2025
  2. WebCoder49 commented on Jul 15, 2025

    @WebCoder49
    OwnerAuthor

    numberIndents was negative due to the closing bracket suggesting an unindent, and not being changed back to zero in checkEnter. Changing it back to zero fixed this.

  3. added a commit that references this issue on Jul 15, 2025
    caa9569
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

    area:existing-pluginA bug/feature for an existing plugin in the plugins folder of code-input.bugSomething isn't workingpriority:high

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions