From 2d6284694df2c27f3b6c5dfbf5ff8c5ab00df7bb Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 22 May 2025 22:10:59 +0800 Subject: [PATCH] code-editor: Fix highlight offset on Windows. (#886) Again, caused by need `split('\n')` not use `.lines()`. --- crates/ui/src/input/code_highlighter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui/src/input/code_highlighter.rs b/crates/ui/src/input/code_highlighter.rs index d63b18a9..4d01f208 100644 --- a/crates/ui/src/input/code_highlighter.rs +++ b/crates/ui/src/input/code_highlighter.rs @@ -53,7 +53,7 @@ impl CodeHighlighter { let mut lines = vec![]; let mut new_cache = HashMap::new(); - for line in text.lines() { + for line in text.split('\n') { let cache_key = gpui::hash(&line); // cache hit