Keep mod diagnostic truncation valid UTF-8

This commit is contained in:
chazmm committed 2026-09-08 18:30:23 +01:00
1 parent c098a60d87
commit 72152f4b50
1 file changed
+3 -2
+3 -2
View File
@@ -332,8 +332,9 @@ fn draw(
if let Some((key, value)) = &menu.editing {
description += &format!("\nEditing {key}: {value}_");
}
if description.chars().count()>650 {
description=description.chars().take(650).collect::<String>()+"…\nFull errors are in the session log.";
if description.chars().count() > 650 {
description = description.chars().take(650).collect::<String>()
+ "...\nFull errors are in the session log.";
}
***detail = description;
}