Fix line with invisibles positioning (#12211)

Release Notes:

- fixed positioning of whitespace dots on multibyte text
([#10332](https://github.com/zed-industries/zed/issues/10332)).
This commit is contained in:
Conrad Irwin 2024-05-23 12:16:16 -06:00 committed by GitHub
parent 951fbc57ba
commit 9c35187aac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3903,10 +3903,10 @@ impl LineWithInvisibles {
} else {
invisibles.extend(
line_chunk
.chars()
.bytes()
.enumerate()
.filter(|(_, line_char)| {
let is_whitespace = line_char.is_whitespace();
let is_whitespace = (*line_char as char).is_whitespace();
non_whitespace_added |= !is_whitespace;
is_whitespace
&& (non_whitespace_added || !inside_wrapped_string)