Make scrollbar content detection cheaper
Remove scrollbars from multibuffers co-authored-by: max <max@zed.dev>
This commit is contained in:
parent
9e46b17149
commit
8669dcdc81
4 changed files with 65 additions and 49 deletions
|
@ -526,11 +526,9 @@ pub struct EditorSnapshot {
|
|||
}
|
||||
|
||||
impl EditorSnapshot {
|
||||
fn has_scrollbar_info(&self) -> bool {
|
||||
self.buffer_snapshot
|
||||
.git_diff_hunks_in_range(0..self.max_point().row())
|
||||
.next()
|
||||
.is_some()
|
||||
fn has_scrollbar_info(&self, is_singleton: bool) -> bool {
|
||||
is_singleton && self.buffer_snapshot
|
||||
.has_git_diffs()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue