Avoid overwriting mouse wheel scroll with selection auto-scroll (#4207)

Release Notes:

- Fixed an issue where mouse wheel events could be ignored while
selecting text near the top or bottom of the editor with the mouse.
This commit is contained in:
Julia
2024-01-22 19:07:03 -05:00
committed by GitHub
3 changed files with 27 additions and 8 deletions
+1 -2
View File
@@ -531,8 +531,7 @@ impl EditorElement {
SelectPhase::Update {
position: point_for_position.previous_valid,
goal_column: point_for_position.exact_unclipped.column(),
scroll_position: (position_map.snapshot.scroll_position() + scroll_delta)
.clamp(&gpui::Point::default(), &position_map.scroll_max),
scroll_delta,
},
cx,
);