Ask kitten: Fix rendering of multiline messages

This commit is contained in:
Kovid Goyal 2022-01-22 09:40:05 +05:30
parent d17757cc84
commit fe7045dd2f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -173,7 +173,8 @@ class Choose(Handler):
y = max(0, self.screen_size.rows // 2 - 2)
self.print(end='\r\n'*y)
if self.cli_opts.message:
y += self.draw_long_text(self.cli_opts.message)
for line in self.cli_opts.message.splitlines():
y += self.draw_long_text(line)
if self.screen_size.rows > 2:
self.print()
y += 1