This commit is contained in:
Kovid Goyal 2025-02-17 19:56:39 +05:30
parent 7641bab690
commit a7f76ee8f7
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 0 deletions

View file

@ -3626,6 +3626,7 @@ ansi_for_range(Screen *self, const Selection *sel, bool insert_newlines, bool st
index_type end = x_start;
while (end < x_limit && line->cpu_cells[end].temp_flag) end++;
if (line_as_ansi(line, &s, x_start, end, prefix_char, !is_first_line)) has_escape_codes = true;
need_newline = insert_newlines && !line->cpu_cells[line->xnum-1].next_char_was_wrapped;
prefix_char = 0;
x_start = MAX(x_start + 1, end);
}

View file

@ -633,6 +633,7 @@ class TestScreen(BaseTest):
expected = ''.join(('55555', '\n66666', '\n77777', '\n88888', '\n99999'))
self.ae(ts(), expected)
self.ae(ts(True), expected)
s.scroll(2, True)
self.ae(ts(), expected)
s.reset()