History

Match zed1 scrollbar drag behavior

Still not ideal, but we need to ship and this is more than reasonable

Julia committed 2 years ago

Commit 51396341 parent 3e6b84a1 file · +1 −1Browse files

Unified · Split

crates/editor2/src/element.rs+1−1
@@ -1369,7 +1369,7 @@ impl EditorElement { · 1368 unmodified lines
13691369 {
13701370 let y = mouse_position.y;
13711371 let new_y = event.position.y;
1372− if thumb_top < y && y < thumb_bottom {
1372+ if (track_bounds.top()..track_bounds.bottom()).contains(&y) {
13731373 let mut position = editor.scroll_position(cx);
13741374 position.y += (new_y - y) * (max_row as f32) / height;
13751375 if position.y < 0.0 {