mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 19:10:24 +00:00
Double max event count for zeta (#22772)
Release Notes: - N/A Co-authored-by: Thorsten <thorsten@zed.dev>
This commit is contained in:
parent
fb272c0edc
commit
aa0eaea4e9
1 changed files with 3 additions and 1 deletions
|
@ -205,6 +205,8 @@ impl Zeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn push_event(&mut self, event: Event) {
|
fn push_event(&mut self, event: Event) {
|
||||||
|
const MAX_EVENT_COUNT: usize = 20;
|
||||||
|
|
||||||
if let Some(Event::BufferChange {
|
if let Some(Event::BufferChange {
|
||||||
new_snapshot: last_new_snapshot,
|
new_snapshot: last_new_snapshot,
|
||||||
timestamp: last_timestamp,
|
timestamp: last_timestamp,
|
||||||
|
@ -229,7 +231,7 @@ impl Zeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.events.push_back(event);
|
self.events.push_back(event);
|
||||||
if self.events.len() > 10 {
|
if self.events.len() > MAX_EVENT_COUNT {
|
||||||
self.events.pop_front();
|
self.events.pop_front();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue