Merge pull request #1761 from zed-industries/mouse-region-view-invalidation

Remove unconditional invalidation when calling mouse region handlers
This commit is contained in:
Nathan Sobo 2022-10-14 18:31:23 -06:00 committed by GitHub
commit 1750fcf833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View file

@ -558,6 +558,8 @@ impl StateInner {
let visible_range = self.visible_range(height, scroll_top);
self.scroll_handler.as_mut().unwrap()(visible_range, cx);
}
cx.notify();
}
fn scroll_top(&self, logical_scroll_top: &ListOffset) -> f32 {

View file

@ -482,9 +482,6 @@ impl Presenter {
if let Some(callback) = valid_region.handlers.get(&region_event.handler_key()) {
event_cx.handled = true;
event_cx
.invalidated_views
.insert(valid_region.id().view_id());
event_cx.with_current_view(valid_region.id().view_id(), {
let region_event = region_event.clone();
|cx| {