diff options
Diffstat (limited to 'edit.py')
-rw-r--r-- | edit.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -21,7 +21,8 @@ def edit(data, buf, args): editor = (weechat.config_get_plugin("editor") or os.environ.get("EDITOR", "vim -f")) path = os.path.expanduser("~/.weechat/message.txt") - open(path, "w+") + with open(path, "w+") as f: + f.write(weechat.buffer_get_string(buf, "input")) cmd = editor.split() + [path] code = subprocess.Popen(cmd).wait() |