Skip to content

Commit

Permalink
Display messages with \n on multiple lines
Browse files Browse the repository at this point in the history
Use `replace_whitespace=False` in `tetxwrap`.

Fixes isamert#93
  • Loading branch information
exquo committed Nov 19, 2020
1 parent a6544cf commit 63a54f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scli
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 63a54f0

Please sign in to comment.