mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-03 05:51:27 +01:00
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:
@@ -2326,7 +2326,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 append = |buffer: &mut Buffer, text: &str, cx: &mut Context<Buffer>| {
|
||||
let ix = buffer.len();
|
||||
buffer.edit([(ix..ix, text)], Some(AutoindentMode::EachLine), cx);
|
||||
|
||||
Reference in New Issue
Block a user