Fix cursor adjustment on scroll
Fixes: zed-industries/community#1929 Also preserves visual modes correctly.
This commit is contained in:
parent
d1aa82bb48
commit
e3c0e93e46
2 changed files with 20 additions and 23 deletions
|
@ -29,6 +29,7 @@ use self::{
|
|||
};
|
||||
|
||||
pub const SCROLL_EVENT_SEPARATION: Duration = Duration::from_millis(28);
|
||||
pub const VERTICAL_SCROLL_MARGIN: f32 = 3.;
|
||||
const SCROLLBAR_SHOW_INTERVAL: Duration = Duration::from_secs(1);
|
||||
|
||||
#[derive(Default)]
|
||||
|
@ -136,7 +137,7 @@ pub struct ScrollManager {
|
|||
impl ScrollManager {
|
||||
pub fn new() -> Self {
|
||||
ScrollManager {
|
||||
vertical_scroll_margin: 3.0,
|
||||
vertical_scroll_margin: VERTICAL_SCROLL_MARGIN,
|
||||
anchor: ScrollAnchor::new(),
|
||||
ongoing: OngoingScroll::new(),
|
||||
autoscroll_request: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue