Fix scrolling too fast on selection for editor and terminal (#28309)
This commit is contained in:
parent
1264e7a200
commit
3b787e85a4
2 changed files with 2 additions and 2 deletions
|
@ -8404,7 +8404,7 @@ enum CursorPopoverType {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn scale_vertical_mouse_autoscroll_delta(delta: Pixels) -> f32 {
|
pub fn scale_vertical_mouse_autoscroll_delta(delta: Pixels) -> f32 {
|
||||||
(delta.pow(1.5) / 100.0).into()
|
(delta.pow(1.2) / 100.0).min(px(3.0)).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scale_horizontal_mouse_autoscroll_delta(delta: Pixels) -> f32 {
|
fn scale_horizontal_mouse_autoscroll_delta(delta: Pixels) -> f32 {
|
||||||
|
|
|
@ -1590,7 +1590,7 @@ impl Terminal {
|
||||||
return None;
|
return None;
|
||||||
};
|
};
|
||||||
|
|
||||||
Some(scroll_lines)
|
Some(scroll_lines.clamp(-3, 3))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mouse_down(&mut self, e: &MouseDownEvent, _cx: &mut Context<Self>) {
|
pub fn mouse_down(&mut self, e: &MouseDownEvent, _cx: &mut Context<Self>) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue