Weird interaction between visual mode and preview

Open
#367 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the numbered sequence in VSCode with the Quarto extension while the preview pane and process remain open. Trace the visual/source mode switch and preview interaction; done means switching modes reuses the current tab, preserves tab positions, and does not require killing the preview process.

Written by the indexing model from the issue text.

Description

I can toggle between visual/source modes with C-S-F4, the same tab switches between modes as expected.

But consider the following sequence.

  1. The editor is in source mode.
  2. I press the preview button and a preview pane is opened aside.
  3. I switch to visual mode with C-S-F4.
  4. Instead of replacing the current tab a new tab for the same file is created in visual mode. 🚨
  5. I switch to source mode with C-S-F4 from the new tab.
  6. The tab is closed and I'm sent back to the original one. 🚨
  7. I switch to visual mode again with C-S-F4.
  8. A new tab is open, etc.
  9. Now I go back to the original tab, keeping the new one open.
  10. From there I switch to visual mode again.
  11. Tab positions are swapped and I keep staying at the original one. 🚨

Now if I not only close the preview pane but also kill the preview process, everything comes back to normality.

I've attached a screencast showing the problem.

  • macOS Sonoma 14.3
  • VSCode 1.86.0
  • Quarto extension 1.110.1
  • Quarto CLI 1.4.549

https://github.com/quarto-dev/quarto/assets/2845433/9956f365-f154-49c5-b43f-478f6e838591

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.