posit-dev / posit-dev/positron
Cursor jumping to start of chunk in visual mode quarto after switching back from a different window
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
System details: Windows 11
Positron and OS details:
Positron Version: 2024.07.0 (system setup) build 2024.07.0-125
Code - OSS Version: 1.91.0
Commit: cae4905332a0f41a6233e196b48a6679b832000a
Date: 2024-07-31T22:26:02.970Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631
Interpreter details:
R 4.2.2
Describe the issue:
The cursor jumps to the start of code chunk in visual mode of Quarto after switching back from another screen/window. The problem is also reported under the Quarto repository ( https://github.com/quarto-dev/quarto/issues/340). A video is provided there.
However, it was explained by jjallaire there that it is a VS Code issue and cannot be fixed on their part. I hope the positron team can fix this issue as you can deal directly with the internal code.
Steps to reproduce the issue:
- Start a quarto document
- Switch to visual mode
- Start a code chunk (R/Python/Latex...)
- Input some random code and click somewhere random in the code chunk so the cursor is not at the beginning
- Switch to another window/screen (e.g. with Alt+Tab in Windows)
- Switch back to Quarto
- Cursor is at the start of the chunk
Expected or desired behavior:
When switching back from another window, the cursor remains where it was
Were there any error messages in the UI, Output panel, or Developer Tools console?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in a Quarto document using visual mode, a code chunk, and a second window, following the listed Windows steps. Compare the behavior with the linked Quarto issue and verify that returning to Positron preserves the cursor position rather than moving it to the chunk start.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, python, r
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100