mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix: Ctrl+V
trigger twice due to async operation (#249)
This commit is contained in:
parent
446445ee73
commit
c94f5877e3
1 changed files with 2 additions and 2 deletions
|
@ -127,6 +127,8 @@ namespace SourceGit.Views
|
|||
}
|
||||
else if (e.Key == Key.V && ((OperatingSystem.IsMacOS() && e.KeyModifiers == KeyModifiers.Meta) || (!OperatingSystem.IsMacOS() && e.KeyModifiers == KeyModifiers.Control)))
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
var text = await App.GetClipboardTextAsync();
|
||||
if (!string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
|
@ -152,8 +154,6 @@ namespace SourceGit.Views
|
|||
SubjectEditor.Paste(text.ReplaceLineEndings(" "));
|
||||
}
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue