# HG changeset patch
# User Steve Losh <steve@stevelosh.com>
# Date 1543250375 18000
# Node ID 0364a90a77fc571184fddde0763368ea7d74c0e8
# Parent  5d1659688c9bdd355cdf4512a8361589a3dfb560
Fix editor.py to work with wee-slacks multiline support

diff -r 5d1659688c9b -r 0364a90a77fc weechat/python/autoload/editor.py
--- a/weechat/python/autoload/editor.py	Mon Nov 26 10:31:19 2018 -0500
+++ b/weechat/python/autoload/editor.py	Mon Nov 26 11:39:35 2018 -0500
@@ -35,7 +35,7 @@
         tf.file.close()
         tf = file(tf.name)
 
-        return tf.readlines()
+        return tf.read()
 
 def editor(data, buffer, args):
     suffix = args or "tmp"
@@ -45,9 +45,7 @@
     data = get_data(suffix, line)
     if data:
         weechat.command(buffer, "/input delete_line")
-
-        for line in data:
-            weechat.command(buffer, line)
+        weechat.command(buffer, data)
 
     weechat.command("", "/window refresh")