In visual editor, bringing app out of and then back in focus does not maintain cursor position

Open
#715 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript, vscode
Domain
tooling

Research direction

Reproduce the issue by editing a .qmd in visual mode, placing the cursor at the end of a chunk line, switching to another app, and returning to VS Code or Positron. Trace the visual editor's focus handling in the Quarto extension; done means the cursor remains at the same position after focus is restored.

Written by the indexing model from the issue text.

Description

bug visual-editor
Bug description

Reported in posit-dev/positron/issues/7731

I see this behavior both in Positron and VS Code:

  • Edit a .qmd in visual mode
  • Put your cursor in a chunk, but at the end of a line
  • Click to bring a different app into focus (not VS Code/Positron)
  • Click back to VS Code/Positron

Notice that your cursor is not in the same place anymore, but now at the beginning of the chunk.

Your environment

Quarto extension v1.121.0

Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Contributor guide

No contributing guide indexed for this repository

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.

More from quarto-dev/quarto

All issues in quarto-dev/quarto

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.