replace newlines with spaces in set_string_truncated_at_end

pull/11108/head
Pascal Sommer 5 months ago
parent 0c8d51ee36
commit 42a6201856

@ -409,6 +409,8 @@ impl Buffer {
let max_x_offset = min(self.area.right() as usize, width.saturating_add(x as usize)); let max_x_offset = min(self.area.right() as usize, width.saturating_add(x as usize));
for s in string.graphemes(true) { for s in string.graphemes(true) {
let s = if s == "\n" { " " } else { s };
let width = s.width(); let width = s.width();
if width == 0 { if width == 0 {
continue; continue;

Loading…
Cancel
Save