[meld] dirdiff: Join copied paths with a newline



commit 74769cc6884eef0446d98592be05bc11d5627c14
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jan 12 08:02:08 2020 +1000

    dirdiff: Join copied paths with a newline
    
    While it's not a common use case (and not easy to trigger), it's still
    possible to try to copy paths for multiple files, and in that case it's
    probably more useful to newline separate them.

 meld/dirdiff.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index a99779dd..7565d7c8 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -1366,7 +1366,7 @@ class DirDiff(Gtk.VBox, tree.TreeviewCommon, MeldDoc):
         files = [f for f in files if f]
         if files:
             clip = Gtk.Clipboard.get_default(Gdk.Display.get_default())
-            clip.set_text(''.join([str(f) for f in files]), -1)
+            clip.set_text('\n'.join(str(f) for f in files), -1)
             clip.store()
 
     def action_ignore_case_change(self, action, value):


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