language: Only block the foreground on buffer reparsing when necessary (#43888)
Gist is we only need to block the foreground thread for reparsing if immediate language changes are useful to the user. That is usually only the case when they edit the buffer Release Notes: - Improved performance of large project searches and project diffs Co-authored by: David Kleingeld <david@zed.dev>
This commit is contained in:
@@ -40,7 +40,7 @@ mod tests {
|
||||
});
|
||||
|
||||
cx.new(|cx| {
|
||||
let mut buffer = Buffer::local("", cx).with_language(language, cx);
|
||||
let mut buffer = Buffer::local("", cx).with_language_immediate(language, cx);
|
||||
|
||||
let expect_indents_to =
|
||||
|buffer: &mut Buffer, cx: &mut Context<Buffer>, input: &str, expected: &str| {
|
||||
|
||||
Reference in New Issue
Block a user