makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.17k stars 67 forks source link

Add half_pgup and half_pgdn bindings #304

Closed friedev closed 2 years ago

friedev commented 2 years ago

Adds half_pgup and half_pgdn bindings (CmdHalfPgup and CmdHalfPgdn), which scroll by half a page, like vim and less. These are unbound by default, but are listed in the default config file and have a help entry.

This was implemented by refactoring pageUp and pageDown into a generic relativeScroll method called by all page up/down functions. There's a change that the float conversions might not yield exactly the same scroll distance, but it shouldn't be off by more than a line if so.

Fixes #303

makew0rld commented 2 years ago

Thanks for your contribution! I've opted to just change the behaviour of the original paging bindings, see #303.