mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-26 15:44:20 +00:00
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:
parent
0f7f540138
commit
cdc5cc348f
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue