mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 12:34:44 +02:00
Switch to tracking linewrap on the last cell in a line
This allows us to have newline not affect the wrap status of a line. Now a lines wrapping status is changed only when the last cell in the line is changed. This actually matches the behavior of many other terminal emulators so is probably a good thing from a ecosystem compatibility perspective. The fish shell expects this weird behavior of newline not changing wrapping status, for unknown reasons, which is the actual motivation for doing all this work. Fixes #5766
This commit is contained in:
@@ -278,8 +278,6 @@ def as_text(
|
||||
h: List[str] = [pht] if pht else []
|
||||
screen.as_text_for_history_buf(h.append, as_ansi, add_wrap_markers)
|
||||
if h:
|
||||
if not screen.linebuf.is_continued(0):
|
||||
h[-1] += '\n'
|
||||
if as_ansi:
|
||||
h[-1] += '\x1b[m'
|
||||
ans = ''.join(chain(h, lines))
|
||||
|
||||
Reference in New Issue
Block a user