Skip to content

Commit a911cc7

Browse files
taoocerosjjw24
authored andcommitted
Fix Copy Fail Error (don't understand why)
1 parent 7dc3ac1 commit a911cc7

File tree

1 file changed

+6
-6
lines changed
  • Plugins/Flow.Launcher.Plugin.Calculator

1 file changed

+6
-6
lines changed

Plugins/Flow.Launcher.Plugin.Calculator/Main.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static Main()
3434
{
3535
MagesEngine = new Engine();
3636
}
37-
37+
3838
public void Init(PluginInitContext context)
3939
{
4040
Context = context;
@@ -78,16 +78,16 @@ public List<Result> Query(Query query)
7878
{
7979
try
8080
{
81-
Clipboard.SetText(newResult);
81+
Clipboard.SetDataObject(newResult);
8282
return true;
8383
}
84-
catch (ExternalException)
84+
catch (ExternalException e)
8585
{
8686
MessageBox.Show("Copy failed, please try later");
8787
return false;
8888
}
8989
}
90-
}
90+
}
9191
};
9292
}
9393
}
@@ -111,7 +111,7 @@ private bool CanCalculate(Query query)
111111
{
112112
return false;
113113
}
114-
114+
115115
if (!IsBracketComplete(query.Search))
116116
{
117117
return false;
@@ -164,7 +164,7 @@ private bool IsBracketComplete(string query)
164164

165165
return leftBracketCount == 0;
166166
}
167-
167+
168168
public string GetTranslatedPluginTitle()
169169
{
170170
return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_name");

0 commit comments

Comments
 (0)