mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 10:56:19 +04:00
replace newlines with spaces in set_string_truncated_at_end
This commit is contained in:
parent
0c8d51ee36
commit
42a6201856
@ -409,6 +409,8 @@ pub fn set_string_truncated_at_end(
|
||||
let max_x_offset = min(self.area.right() as usize, width.saturating_add(x as usize));
|
||||
|
||||
for s in string.graphemes(true) {
|
||||
let s = if s == "\n" { " " } else { s };
|
||||
|
||||
let width = s.width();
|
||||
if width == 0 {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user