Microsoft/vscode

git.openFile opens in wrong split

Open

#265,405 创建于 2025年9月5日

在 GitHub 查看
 (1 评论) (0 反应) (1 负责人)TypeScript (74,848 star) (10,221 fork)batch import
buggithelp wanted

描述

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.103.2 (Universal)
  • OS Version: Darwin arm64 24.6.0

Steps to Reproduce:

  1. Open two diff editors in different split panels
  2. Click the "git.openFile" editor action button for the editor that isn't focused

The file opens in the same panel as the focused editor instead of the same panel as the corresponding diff editor. This is disorienting and doesn't match the behavior of other editor action buttons such as "workbench.action.splitEditor". This issues is also present with buttons provided by extensions such as "pr.addFileComment" from https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github.

https://github.com/user-attachments/assets/950c9c0c-e9cb-435c-acc2-41cd51c72c63

贡献者指南