zed/crates/language
Max Brunsfeld 9813297892
Combine multiple buffer update count fields into one (#13449)
Buffers carry several pieces of state besides their text: syntax tree,
diagnostics, git diff, and file data. Previously, the buffer maintained
a separate integer version number for each of these four pieces of
state, incrementing it every time that piece of state is updated. This
is used by MultiBuffers to detect when they need to update excerpts.

Previously, for a given buffer, these four version numbers were stored
on the buffer itself, on every snapshot of the buffer, in any
multi-buffer that referenced that buffer, **and** on snapshots of that
multi-buffer. But the only use for the version numbers was reduced down
to a single boolean predicate: whether or not the buffer's state has
changed.

In this PR, I've combined those 4 version numbers into one. I've called
it `non_text_state_update_count` because it tracks all state updates
outside of the text itself. This removes a bunch of unnecessary code,
and reduces the size of buffer snapshots and multi-buffer snapshots.

Release Notes:

- N/A
2024-06-23 22:20:10 -07:00
..
src Combine multiple buffer update count fields into one (#13449) 2024-06-23 22:20:10 -07:00
build.rs Fix context line handline in project diagnostic view 2021-12-21 11:46:47 -08:00
Cargo.toml Overhaul inline assistant (#12846) 2024-06-11 12:39:45 +02:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00