mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
Merge pull request #422 from hannesbraun/staging-with-enter
Add Enter as keybinding for staging/unstaging
This commit is contained in:
commit
69b9d62e57
1 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
private void OnUnstagedKeyDown(object _, KeyEventArgs e)
|
private void OnUnstagedKeyDown(object _, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (DataContext is ViewModels.WorkingCopy vm && e.Key == Key.Space)
|
if (DataContext is ViewModels.WorkingCopy vm && e.Key is Key.Space or Key.Enter)
|
||||||
{
|
{
|
||||||
vm.StageSelected();
|
vm.StageSelected();
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
@ -71,7 +71,7 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
private void OnStagedKeyDown(object _, KeyEventArgs e)
|
private void OnStagedKeyDown(object _, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (DataContext is ViewModels.WorkingCopy vm && e.Key == Key.Space)
|
if (DataContext is ViewModels.WorkingCopy vm && e.Key is Key.Space or Key.Enter)
|
||||||
{
|
{
|
||||||
vm.UnstageSelected();
|
vm.UnstageSelected();
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
|
Loading…
Reference in a new issue