Fix a missing newline when using the pipe command between the scrollback and screen contents

See #1642
This commit is contained in:
Kovid Goyal 2019-05-28 15:30:44 +05:30
parent c2fd7005cb
commit 39f50830d7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Add support for the underscore key found in some keyboard layouts
(:iss:`1639`)
- Fix a missing newline when using the pipe command between the
scrollback and screen contents (:iss:`1642`)
0.14.0 [2019-05-24]
---------------------

View File

@ -2310,6 +2310,7 @@ static PyMemberDef members[] = {
{"grman", T_OBJECT_EX, offsetof(Screen, grman), READONLY, "grman"},
{"color_profile", T_OBJECT_EX, offsetof(Screen, color_profile), READONLY, "color_profile"},
{"linebuf", T_OBJECT_EX, offsetof(Screen, linebuf), READONLY, "linebuf"},
{"main_linebuf", T_OBJECT_EX, offsetof(Screen, main_linebuf), READONLY, "main_linebuf"},
{"historybuf", T_OBJECT_EX, offsetof(Screen, historybuf), READONLY, "historybuf"},
{"scrolled_by", T_UINT, offsetof(Screen, scrolled_by), READONLY, "scrolled_by"},
{"lines", T_UINT, offsetof(Screen, lines), READONLY, "lines"},

View File

@ -487,6 +487,8 @@ class Window:
sanitizer = text_sanitizer(as_ansi, add_wrap_markers)
h = list(map(sanitizer, h))
self.screen.historybuf.as_text(h.append, as_ansi, add_wrap_markers)
if not self.screen.linebuf.is_continued(0) and h:
h[-1] += '\n'
lines = chain(h, lines)
return ''.join(lines)