[dconf-editor] Better behaviour when pasting empty clipboard.



commit f63e7748cc986d606ca0c60f01f767eae4c6ce19
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Sep 21 16:19:48 2018 +0200

    Better behaviour when pasting empty clipboard.

 editor/dconf-window.vala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 0f31fee..e624f99 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -1072,7 +1072,10 @@ private class DConfWindow : ApplicationWindow
                         if (display == null)    // ?
                             return false;
                         string? clipboard_content = Clipboard.get_default ((!) display).wait_for_text ();
-                        request_search (true, PathEntry.SearchMode.EDIT_PATH_MOVE_END, clipboard_content);
+                        if (clipboard_content != null)
+                            request_search (true, PathEntry.SearchMode.EDIT_PATH_MOVE_END, 
clipboard_content);
+                        else
+                            request_search (true, PathEntry.SearchMode.SEARCH);
                         return true;
                     }
                     return false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]