mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-09 21:26:14 +03:00
9813297892
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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-GPL |