From 63a54f07119f1cb1630684b0ccf9c807a6eafeb2 Mon Sep 17 00:00:00 2001 From: exquo <62397152+exquo@users.noreply.github.com> Date: Thu, 19 Nov 2020 14:28:06 +0000 Subject: [PATCH] Display messages with `\n` on multiple lines Use `replace_whitespace=False` in `tetxwrap`. Fixes #93 --- scli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scli b/scli index 4c934e7..3d935c6 100755 --- a/scli +++ b/scli @@ -1970,7 +1970,7 @@ class State: self.delivery_status.process_buffered_receipts(msg_widget) def format_msg(self, message): - message = '\n'.join(textwrap.wrap(message, width=self.cfg.wrap_at)) + message = '\n'.join(textwrap.fill(line, width=self.cfg.wrap_at, expand_tabs=False, replace_whitespace=False) for line in message.splitlines()) if not self.cfg.use_formatting: return ntxt(message)