posit-dev / posit-dev/positron

Focus Source (with RStudio Keymap) doesn't work if source is in a new window

Open
#4,495 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

If the source is in a new window, Focus Source (with RStudio Keymap) doesn't focus the source in the new window, but tries to focus the editor panel in the same window with the console. If there is no source open in that main window, it will try to open an "empty" editor.

Kapture 2024-08-27 at 21 21 49

I was expecting the focus to go back to the new window. If there were multiple new windows, the focus should go back to the new window where the cursor was before focusing console. This is how it works in RStudio:

Kapture 2024-08-27 at 21 29 56

I am very used to writing a few lines in the source then switching to the console to try a few things, and going back and forth between the two. My hands don't need to leave the keyboard in RStudio, but in Positron I have to pause and use the mouse to click to switch back, if I want to view my source in a separate window (on a different monitor).

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 Focus Source (with RStudio Keymap) behavior with a source in a separate window, including multiple separate source windows. No files, tests, or entry points are named in the issue, so first locate the command handling focus restoration and its existing tests. Done means focus returns to the source window where the cursor was before switching to the console, without opening an empty editor.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.