mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 18:30:34 +08:00
refactor: try to fix the issue that pasting into branch/tag name textbox got duplicated text (#1792)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -44,6 +44,8 @@ namespace SourceGit.Views
|
||||
|
||||
private async void OnPastingFromClipboard(object sender, RoutedEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
try
|
||||
{
|
||||
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
|
||||
@@ -54,9 +56,9 @@ namespace SourceGit.Views
|
||||
OnTextInput(new TextInputEventArgs() { Text = text });
|
||||
}
|
||||
}
|
||||
finally
|
||||
catch
|
||||
{
|
||||
e.Handled = true;
|
||||
// Ignore exceptions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user