posit-dev / posit-dev/positron

Executing the last line in a file should insert _and_ move to the next line if the last line contained code

Open
#1,272 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: editor
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

i.e. we currently have a behavior that inserts a new line and then purposefully avoids moving to the new line, but that is mainly useful if there is no code on the last line (so you avoid repeated new line insertions)

This affects both R and Python

https://github.com/posit-dev/positron/assets/19150088/2f2be91e-eb6a-4325-a8f3-5e66d5a52335

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 the last-line execution behavior for both R and Python, using the attached video for context. Trace the editor's handling of execution at end of file and compare cases where the last line contains code versus no code. Done means executing code on the final line inserts a newline and moves to it, while an empty final line does not cause repeated insertions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.