Return back the eager snapshot update (#45210)
Based on https://github.com/zed-industries/zed/pull/45187#discussion_r2630140112 Release Notes: - N/A Co-authored-by: Lukas Wirth <lukas@zed.dev>
This commit is contained in:
@@ -1697,6 +1697,9 @@ impl Buffer {
|
||||
/// for the same buffer, we only initiate a new parse if we are not already
|
||||
/// parsing in the background.
|
||||
pub fn reparse(&mut self, cx: &mut Context<Self>, may_block: bool) {
|
||||
if self.text.version() != *self.tree_sitter_data.version() {
|
||||
self.invalidate_tree_sitter_data(self.text.snapshot());
|
||||
}
|
||||
if self.reparse.is_some() {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user