diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
index 4a49e9589..1d51b6534 100644
--- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
+++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
@@ -27,6 +27,7 @@
true
true
Readme.md
+ true
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 8474ba50e..0c8fb4d02 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -44,6 +44,9 @@ namespace Flow.Launcher
#region Private Fields
+ // Class Name
+ private static readonly string ClassName = nameof(MainWindow);
+
// Dependency Injection
private readonly Settings _settings;
private readonly Theme _theme;
@@ -1256,14 +1259,21 @@ namespace Flow.Launcher
private void QueryTextBox_OnPaste(object sender, DataObjectPastingEventArgs e)
{
- var isText = e.SourceDataObject.GetDataPresent(DataFormats.UnicodeText, true);
- if (isText)
+ try
{
- var text = e.SourceDataObject.GetData(DataFormats.UnicodeText) as string;
- text = text.Replace(Environment.NewLine, " ");
- DataObject data = new DataObject();
- data.SetData(DataFormats.UnicodeText, text);
- e.DataObject = data;
+ var isText = e.SourceDataObject.GetDataPresent(DataFormats.UnicodeText, true);
+ if (isText)
+ {
+ var text = e.SourceDataObject.GetData(DataFormats.UnicodeText) as string;
+ text = text.Replace(Environment.NewLine, " ");
+ DataObject data = new DataObject();
+ data.SetData(DataFormats.UnicodeText, text);
+ e.DataObject = data;
+ }
+ }
+ catch (Exception ex)
+ {
+ App.API.LogException(ClassName, "Failed to paste text", ex);
}
}