microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.15k stars 28.53k forks source link

Make opening git editor always in current window #189948

Closed kvart714 closed 1 year ago

kvart714 commented 1 year ago

Type: Bug

Hello Sorry if it's a duplicate. But I didn't find anything about this issue in github and google search. maybe i just have the wrong configuration

I actively use vscode. Sometimes I have up to 10 instances open on different desktops. Also vscode is set as git editor by default. So I press git commit amend or git rebase interactive or squash or something else that requires actions in the git editor. The file opens (eg COMMIT_MESSAGE). But it never opens in the current VSCode window! Instead, the focus jumps to another VSCode instance (which I think was opened first). It can be on a different monitor, on a different virtual desktop, or even minimized. It's terribly annoying.

VS Code version: Code 1.81.0 (6445d93c81ebe42c4cbd7a60712e0b17d9463e97, 2023-08-02T12:37:13.485Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 x 2304)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.88GB (1.07GB free)| |Process Argv|--enable-proposed-api TabNine.tabnine-vscode --crash-reporter-id e0ce41fe-7355-4918-b32f-eb6b04e8b527| |Screen Reader|no| |VM|0%|
Extensions (69) Extension|Author (truncated)|Version ---|---|--- vscode-openapi|42C|4.18.6 increment-selection|alb|0.2.0 ng-template|Ang|16.1.4 swagger-viewer|Arj|3.1.2 unique-lines|bib|1.0.0 componizer|bil|0.0.7 braze-liquid-preview|chi|0.1.11 vscode-better-align|cho|1.4.2 path-intellisense|chr|2.8.4 angular-schematics|cyr|5.4.2 quick-html-previewer|dai|1.0.1 vscode-eslint|dba|2.4.2 xml|Dot|2.5.1 vscode-ts-auto-return-type|ebr|1.1.0 prettier-vscode|esb|10.1.0 auto-rename-tag|for|0.1.10 code-runner|for|0.12.0 angular-cli-task-provider|Gen|1.3.2 html-preview-vscode|geo|0.2.5 vscode-angular-html|gha|2.6.1 lintlens|ghm|7.4.2 activitusbar|Gru|0.0.47 vscode-test-explorer|hbe|2.21.1 rest-client|hum|0.25.1 path-autocomplete|ion|1.24.1 batch-rename-extension|Jan|0.0.6 story-explorer|jos|1.0.1 vscode-liquid-snippets|kil|2.0.3 vs-color-picker|lih|1.0.0 vscode-smart-column-indenter|lmc|0.0.13 git-graph|mhu|1.30.0 formate|Mik|1.2.1 vscode-scss|mrm|0.10.0 vscode-docker|ms-|1.26.0 csharp|ms-|2.0.328 dotnet-interactive-vscode|ms-|1.0.4403010 vscode-dotnet-runtime|ms-|1.6.0 vscode-dotnet-sdk|ms-|0.8.0 sqlops-debug|ms-|1.4.0 jupyter|ms-|2023.7.1002162226 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.304.0 live-server|ms-|0.4.9 mono-debug|ms-|0.16.3 test-adapter-converter|ms-|0.1.8 language-liquid|nei|0.1.1 typescript-explicit-types|nic|0.0.9 angular-console|nrw|18.6.0 vscode-versionlens|pfl|1.5.0 angular-component-extractor|PKi|0.1.0 material-icon-theme|PKi|4.29.0 tsimporter|pmn|2.0.1 vscode-thunder-client|ran|2.10.2 vscode-yaml|red|1.14.0 vscode-gitweblinks|red|2.9.2 vscode-coverage-gutters|rya|2.11.0 shopify-liquid|sis|3.2.2 vscode-stylelint|sty|1.2.4 msbuild-project-tools|tin|0.4.9 hosts|tom|1.2.0 pdf|tom|1.2.2 rename-angular-component|tom|2.1.3 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vscode-nginx|wil|0.7.2 change-case|wma|1.0.0
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30803844 282f8724:30602487 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 vsctsb:30748421 03d35959:30757346 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofa:30804715 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 e537b577:30795824 h0f32768:30792100 dsvsc013:30795093 dsvsc014:30804076 ```
lszomoru commented 1 year ago

@bpasero, is this something that you initially implemented? If so, do you mind chiming in? Thanks!

bpasero commented 1 year ago

Maybe try to configure code-insiders --wait -r which instructs it to reuse the last focused window.

VSCodeTriageBot commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!