gizak / termui

Golang terminal dashboard
MIT License
13.23k stars 786 forks source link

Added more scrolling options to list widget. #221

Closed joshcol9232 closed 5 years ago

joshcol9232 commented 5 years ago

Added HalfPageUp, HalfPageDown, ScrollTop and ScrollBottom functions. I also added a scrollAmount function, which is not exported in the package since I was not sure if you wanted to make that available to the user. scrollAmount scrolls by the number of rows given. If the number is negative, then it scrolls up, if the number is positive then it will scroll down. I did also have to add a floor function in uitls.go for the HalfPageUp/Down functions.

For issue #219

cjbassi commented 5 years ago

Awesome! Thanks for this. The one change I made was to make the scrollAmount method public since I'm sure someone would appreciate using that.

joshcol9232 commented 5 years ago

Nice :D glad I could help.