Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/rust-analyzer/src/cli/progress_report.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/cli/progress_report.rs b/crates/rust-analyzer/src/cli/progress_report.rs
index 8b143daf2a..c1b1d3f348 100644
--- a/crates/rust-analyzer/src/cli/progress_report.rs
+++ b/crates/rust-analyzer/src/cli/progress_report.rs
@@ -79,8 +79,8 @@ impl<'a> ProgressReport<'a> {
// Backtrack to the first differing character
let mut output = String::new();
output += &'\x08'.to_string().repeat(self.text.len() - common_prefix_length);
- // Output new suffix
- output += &text[common_prefix_length..text.len()];
+ // Output new suffix, using chars() iter to ensure unicode compatibility
+ output.extend(text.chars().skip(common_prefix_length));
// If the new text is shorter than the old one: delete overlapping characters
if let Some(overlap_count) = self.text.len().checked_sub(text.len()) {