Skip to content

extra brackets inserted after navigating away from area #8341

@rmflight

Description

@rmflight

System details:

Positron and OS details:

Positron Version: 2025.07.0 build 170
Code - OSS Version: 1.100.0
Commit: cbe897b
Date: 2025-06-23T03:43:23.429Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.12.10-76061203-generic

Interpreter details:

R 4.4.1

Describe the issue:

If I write code involving brackets, matching brackets are inserted just fine and highlighted and colored to match, awesome.

If I navigate away from the code using brackets, and then come back to the code, and type a closing bracket again (pedantic, I know, but that's how I work), extra brackets are inserted.

This does not happen in RStudio (confirmed in RStudio version 2025.05.1+513)

Steps to reproduce the issue:

test_data = rnorm(100, sd = 20)

subset_data = test_data[1:50]

Type the code into a .R file, and then go back to modify the rnorm code to be:

test_data = rnorm(100, sd = 20, mean = 100)

While typing the last bracket (again). An extra bracket will be inserted.

Expected or desired behavior:

The extra bracket isn't inserted.

Were there any error messages in the UI, Output panel, or Developer Tools console?

I don't think so, beyond the extra bracket being highlighted as not having a matching brace.

-->

positron_brackets.mp4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions