Skip to content

Commit

Permalink
fix: Clipboard is used if text specified with --text is empty (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryonakano authored Jun 8, 2024
1 parent 7a18466 commit c16daa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class Application : Gtk.Application {
public static bool keep_open = false;
public static string text = "";
public static string? text = null;

private OptionEntry[] options = {
{
Expand Down
2 changes: 1 addition & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class MainWindow : Gtk.ApplicationWindow {
private async void update_result_label () {
is_label_updated = true;

if (Application.text != "") {
if (Application.text != null) {
// Set the text passed by the command line option if specified
result_label.label = Application.text;
} else {
Expand Down

0 comments on commit c16daa8

Please sign in to comment.