From 13612ca350c5c054d4ea337e13d88b34281c55e6 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Mon, 4 Nov 2019 19:31:18 +0100 Subject: [PATCH] Compat: result of --remote-expr always ends with newline References https://github.com/mhinz/neovim-remote/pull/121 --- nvr/nvr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvr/nvr.py b/nvr/nvr.py index 2aae547..e7fb7f9 100644 --- a/nvr/nvr.py +++ b/nvr/nvr.py @@ -465,7 +465,9 @@ def main(argv=sys.argv, env=os.environ): elif type(result) is dict: print({ (k.decode() if type(k) is bytes else k): v for (k,v) in result.items() }) else: - print(result) + if not result.endswith(os.linesep): + result += os.linesep + print(result, end='', flush=True) if options.o: if options.d and not nvr.started_new_process: