Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Conversation

jaanauati
Copy link
Contributor

I'm honestly not sure how scrolling is behaving for other platforms/operative systems, but it's been working a little oddly these past months for OSX, after some digging in my local I found that having a small value like 10 improves things a lot getting me a more fluid scrolling experience.

Note: I didn't have so much time to poke with this, so I don't know how your building system works, when tested in my local I just made the change to the minified file (/Applications/Oni.app/Contents/Resources/app/lib/browser/vendor.bundle.js), so please let me know if i'm missing to push any bundle or something else.

Thanks.

@codecov
Copy link

codecov bot commented Sep 5, 2018

Codecov Report

Merging #2551 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2551   +/-   ##
=======================================
  Coverage   44.93%   44.93%           
=======================================
  Files         352      352           
  Lines       14336    14336           
  Branches     1863     1863           
=======================================
  Hits         6442     6442           
  Misses       7669     7669           
  Partials      225      225
Impacted Files Coverage Δ
browser/src/Input/Mouse.ts 6.66% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af03770...5834931. Read the comment docs.

@akinsho
Copy link
Member

akinsho commented Sep 5, 2018

@jaanauati thanks for the PR tbh as a Mac User I noticed that it wasn't quite right after the PR (I forget which) came in but it was slightly improved and I don't scroll much, I'll definitely give this a try locally but since it affects multiple platforms would be good to see what the effect is for @CrossR or @badosu as well

@CrossR
Copy link
Member

CrossR commented Sep 5, 2018

I'll give this a test when I'm home on my Windows Surface and Desktop, so we get both trackpad + trackpad events, since they are both treated differently.

@akinsho
Copy link
Member

akinsho commented Sep 17, 2018

@jaanauati sorry for the delay on trying this out been quite busy lately but will give this a go once I get a moment

@badosu
Copy link
Collaborator

badosu commented Sep 20, 2018

Tested on Arch, looks good to me 👍

@manu-unter
Copy link
Collaborator

manu-unter commented Sep 24, 2018

I tested this with both a mouse and a trackpad on Max OS X High Sierra and it worked nicely.

Just a thought on the side: If we want to make this even smoother and more accurate, could we directly use the fontHeightInPixels as the scrolling threshold and then, instead of ScrollWheelDown/Up keys, send <C-E>/<C-Y> for scrolling only one line? Could this possibly create issues when users have remapped <C-E> or <C-Y> to something else?

Maybe we could even decide based on the _scrollDelta to send one-line(<C-E>/<C-Y>), three-line (<ScrollWheel*>), half-page (<C-D>/<C-U>) or full-page (<C-ScrollWheel*>) keys?

Edit: Or even better: calculate the number of rows and send those via ${rowCount}<C-E> and the same for <C-Y>, respectively

In any case, what you built so far already seems like a great improvement. Let's merge it once @CrossR was able to verify that it works on Windows :)

@CrossR
Copy link
Member

CrossR commented Sep 27, 2018

Tested this on my Surface and with an MX Master and I didn't notice any difference, so if its helping on Mac, thats great!

@CrossR CrossR merged commit 1f2c553 into onivim:master Sep 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants