Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

🐞 Automatically closing outer nested bracket pair when trying to close inner bracket pair

Open
#320 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
swift
Domain
devtools

Research direction

Start by reproducing the exact nested-parenthesis sequence in the source editor: type useEffect(( and press ) with the cursor before the existing outer closing bracket. Trace the bracket-closing behavior and verify that the inner pair receives a closing bracket without replacing the outer pair.

Written by the indexing model from the issue text.

Description

bug
Description

The source editor automatically closes the outer nested bracket pair when trying to close an inner bracket pair.

To Reproduce
  1. Type "useEffect(("
  2. Notice it closes the inner bracket like this useEffect((|)
  3. Try to close the inner bracket pair by pressing ")"
  4. It thinks you are trying to close the outer bracket pair and replaces the outer closing bracket becoming useEffect(()| placing the cursor at the end.
Expected Behavior

We should recognize we are in a unclosed bracket pair which is inside a closed bracket pair. instead of closing, add a closing bracket instead of replacing the outer bracket pair.

Screenshots

Doesn't work as expected:

https://github.com/user-attachments/assets/3dae191a-1f84-4a13-a2de-41bdf5f602e0

Works as expected (when adding an arg)

https://github.com/user-attachments/assets/3a27b2f4-d6a2-474d-828b-fc31234f6c1f

Dominant language
Swift
Stars
720
Forks
162
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodeEditApp/CodeEditSourceEditor

All issues in CodeEditApp/CodeEditSourceEditor

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.