Rollup merge of #65120 - AnthonyMikh:fix_65119, r=estebank
Correctly estimate the required space for string in `StyledBuffer::prepend` Fix #65119 r? @estebank
This commit is contained in:
commit
153d3c3ea7
@ -111,7 +111,7 @@ impl StyledBuffer {
|
||||
|
||||
pub fn prepend(&mut self, line: usize, string: &str, style: Style) {
|
||||
self.ensure_lines(line);
|
||||
let string_len = string.len();
|
||||
let string_len = string.chars().count();
|
||||
|
||||
// Push the old content over to make room for new content
|
||||
for _ in 0..string_len {
|
||||
|
Loading…
x
Reference in New Issue
Block a user