Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stage/revertSelectedRanges keybinding not just in diffEditor #150454

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NicoWeio
Copy link

@NicoWeio NicoWeio commented May 26, 2022

#93706 introduced default keybindings for stageSelectedRanges, unstageSelectedRanges and revertSelectedRanges as per issue #93564, but they don't work in the regular editor, while running the command from the command palette gives the intended result.
Therefore, I propose to extend the when clauses of stageSelectedRanges and revertSelectedRanges. unstageSelectedRanges remains unchanged, since it seems to have no effect in a regular editor.

Note: I tried to be as conservative and left isInDiffEditor intact, but that's probably not needed.

@NicoWeio
Copy link
Author

NicoWeio commented May 26, 2022

I just noticed one should also be able to invoke stageSelectedRanges / revertSelectedRanges on the current line without selecting the line. Fixed in 324a6a2.

At this point, one could even consider using editorFocus, but I'm not sure. 🤷🏼‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants