boysetsfrog / vimpc

Official repository for vimpc a vi/vim inspired client for the Music Player Daemon (mpd). Pull requests are welcome.
GNU General Public License v3.0
269 stars 34 forks source link

Fix integer overflow with negative scrolling #78

Closed cjgriscom closed 5 years ago

cjgriscom commented 6 years ago

In any list of length greater than the screen size, attempting large scroll commands causes an integer overflow and odd screen behavior, for example: 6000 6000 It's caused by scrollLine_ (unsigned integer) overflowing when a negative is added to it.

steils commented 5 years ago

I confirm the bug. The patch fixes it for me. Thanks @cjgriscom! @boysetsfrog could you review it please?