fernandoescolar / vscode-solution-explorer

This is a Visual Studio Code extension that provides a (.sln) Visual Studio Solution explorer panel..
MIT License
348 stars 73 forks source link

Ctr+Enter hotkey should have a "when" condition to not mess with other hotkeys #296

Closed adalisk-emikhaylov closed 3 months ago

adalisk-emikhaylov commented 7 months ago

Describe the bug This extension registers a CtrlEnter hotkey (solutionExplorer.openFileAndFocus), but doesn't set a when condition for it. This breaks this key combination in other places, such as "create commit" when inputting a commit message.

To Reproduce Steps to reproduce the behavior:

  1. Go to the "source control" tab in a git repo.
  2. Type in some message.
  3. Press CtrlEnter, observe nothing happening.
  4. Disable this extension and try again, and you should see a commit being created.

Expected behavior The CtrlEnter hotkey should have a when condition (that disables it at least during commit message editing).

Environment:

jibbers42 commented 7 months ago

This also seems to affect Insert Line Below (determined by extension bisect feature). The command is Solution Explorer: Open File, so it seems like it should only be enabled if the Solution Explorer has focus if possible (I may be misunderstanding the feature).

I may have missed it, but a setting to disable this feature completely would be appreciated.

For now I've added the following to my keybindings.json to disable and Insert Line Below is now working again...

    {
        "key": "ctrl+enter",
        "command": "-solutionExplorer.openFileAndFocus"
    }