code-editor: Fix highlight offset on Windows. (#886)

Again, caused by need `split('\n')` not use `.lines()`.
This commit is contained in:
Jason Lee 2025-05-22 22:10:59 +08:00 committed by GitHub
parent d0ccb6bf17
commit 2d6284694d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@ impl CodeHighlighter {
let mut lines = vec![]; let mut lines = vec![];
let mut new_cache = HashMap::new(); let mut new_cache = HashMap::new();
for line in text.lines() { for line in text.split('\n') {
let cache_key = gpui::hash(&line); let cache_key = gpui::hash(&line);
// cache hit // cache hit