Floobits / atom-term3

Open Terminal tabs in Atom. Fork of Term package
Other
88 stars 17 forks source link

Scroll speed is very fast using a Magic Mouse #57

Open suchipi opened 8 years ago

suchipi commented 8 years ago

Using an Apple Magic Mouse to scroll, the scroll sensitivity is very high. It scrolls about 10 lines per mm I drag my finger across the mouse.

OS X 10.11.3, Atom 1.7.2, term3 0.22.0

benlau commented 8 years ago

I have the same problem, but it also affect my Mac Book Air's trackpad. I have tried to change the "Scroll Sensitivity" in preference. But it don't help.

AndreasPizsa commented 8 years ago

+1 is there a setting somewhere?

jockmac22 commented 8 years ago

+1 I'm having the same issue.

pancodia commented 7 years ago

same issue

mikeifomin commented 7 years ago

Found lines that are responsable for the Issue

https://github.com/Floobits/atom-term.js/blob/4bd056eca0d03e5420472df91923e3e4bb0aaeed/src/term.js#L1130-L1132

replace

self.scrollDisp(ev.wheelDeltaY > 0 ? -5 : 5)

with

self.scrollDisp(-Math.round(ev.wheelDeltaY/20));

Dont have enough time to PR =(
Locally files can be found ~/.atom/packages/term3/node_modules/atom-term.js/src/term.js:1126

on(el, wheelEvent, function(ev) {
    if (self.mouseEvents) return;
    if (ev.type === 'DOMMouseScroll') {
      self.scrollDisp(ev.detail < 0 ? -5 : 5);
    } else {
      //
      // self.scrollDisp(ev.wheelDeltaY > 0 ? -5 : 5);
      // magic mouse / macbook trackbad dirty fix
      self.scrollDisp(-Math.round(ev.wheelDeltaY/20));
    }
    return cancel(ev);
  });