sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
803 stars 39 forks source link

Option to disable diagonal scrolling with a trackpad #6441

Open eugenesvk opened 1 month ago

eugenesvk commented 1 month ago

Problem description

When you scroll up/down with a trackpad it's common that you can't maintain 100% precise vertical gesture movement, so you'd also scroll a bit to the left/right, which has an undesirable layout shift

Preferred solution

An option to block diagonal scrolling: if you've started vertical scrolling, you can't scroll horizontally unless some configurable time without any scroll events has passed

Alternatives

Use a keyboard :)

I also sometimes turn line wrapping off, but that's not ideal either as that introduces another unwanted layout shift

Additional Information

No response

BenjaminSchaaf commented 1 month ago

We have a ~85% filter on scrolling; you don't need anywhere near precise vertical scrolling to get only vertical scrolling. What platform are you on and what version are you using?

eugenesvk commented 1 month ago

(Mac, v4150)

I see that there is indeed some "protection", but think the % isn't enough (though would be nice to expose it in the settings): while on fast scrolls it indeeds helps to tolerate some diagonal movement, on slow scrolls it doesn't help much (guess, the vertical distance isn't high enough), and I think slow scrolls are exactly where it bugged me the most.

I don't think I'd ever need diagonal scrolling, so while there is some smarter filtering algorithm, maybe simple timing would suffice?