mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into rename-file
This commit is contained in:
commit
2febc3412c
2 changed files with 18 additions and 7 deletions
|
|
@ -27,6 +27,7 @@
|
|||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<PackageReadmeFile>Readme.md</PackageReadmeFile>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(APPVEYOR)' == 'True'">
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue