posit-dev / posit-dev/positron

python: cmd/ctrl + enter sometimes doesn't ID the correct range if there's a syntax error in the file

Open
#3,907 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lang: python support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Positron: 2024.07.0-15
OS: MacOS

Without cell:

Only CTRL+ENTER works, and works when placing cursor anywhere in the block
image

image

However, with cell:
Both CTRL+ENTER and SHIFT+ENTER work, but behave differently

SHIFT+ENTER works when placing the cursor anywhere in the block, but NOT CTRL+ENTER (it only works when placing the cursor in the beginning of the block)

CTRL+ENTER

image image

Contributor guide

Open the contributing guide

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.

Research direction

Reproduce this in Positron on macOS with a Python file containing a syntax error, comparing Ctrl/Cmd+Enter and Shift+Enter with and without cells. Check cursor positions within the block and verify that each command identifies the intended range; done means both commands select the correct range consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.