0364a90a77fc

Fix editor.py to work with wee-slacks multiline support
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 26 Nov 2018 11:39:35 -0500
parents 5d1659688c9b
children 4237c4d29d58
branches/tags (none)
files weechat/python/autoload/editor.py

Changes

--- 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")