CodeEditApp / CodeEditApp/CodeEditSourceEditor

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

Đang mở
#320 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Swift
Star
719
Fork
160
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.