From 65740487635a7c0c72a07f7336080af9356e6c3c Mon Sep 17 00:00:00 2001 From: dece Date: Sun, 18 Apr 2021 02:27:40 +0200 Subject: [PATCH] command_line: fix new line issue when using editor --- bebop/command_line.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bebop/command_line.py b/bebop/command_line.py index 79ec5c1..1805029 100644 --- a/bebop/command_line.py +++ b/bebop/command_line.py @@ -174,12 +174,12 @@ class CommandLine: except OSError: return - command = ["vi", temp_filepath] + command = self.editor_command + [temp_filepath] open_external_program(command) try: with open(temp_filepath, "rt") as temp_file: - content = temp_file.read() + content = temp_file.read().rstrip("\r\n") os.unlink(temp_filepath) except OSError: return