diff --git a/docs/changelog.rst b/docs/changelog.rst index 8ba480320..3bef6bfb8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,6 +10,9 @@ To update |kitty|, :doc:`follow the instructions `. - 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] --------------------- diff --git a/kitty/screen.c b/kitty/screen.c index 7e7b8ada4..50ff86563 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -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"}, diff --git a/kitty/window.py b/kitty/window.py index afbbd2eb0..a0cdc2b98 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -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)