rhysd / neovim-component

<neovim-editor> WebComponent to embed Neovim to your app with great ease
https://github.com/rhysd/NyaoVim
MIT License
193 stars 18 forks source link

Fix scroll wheel #27

Closed romgrk closed 8 years ago

romgrk commented 8 years ago

Hello :)

Yes, the <ScrollWheel*><x,y> is needed and it means <ScrollWheel*><col,line>, otherwise scrolling with the mouse over a different window scrolls the window at line scroll_y and column scroll_x. (Given that it mostly produces numbers ∈ [-3, 3], the 1st window gets scrolled instead of the :hovered window).

(Actually, exactly the same you did in https://github.com/rhysd/neovim-component/blob/master/src/neovim/screen-drag.ts#L22)

rhysd commented 8 years ago

I understood my mistake. Thank you! I'll merge this PR and then improve wheel handling based on this PR.