dsanson / termpdf.py

A graphical pdf and epub reader that works inside the kitty terminal
MIT License
496 stars 30 forks source link

Fix: crash from reverse buffer cycling #25

Closed entrez closed 2 years ago

entrez commented 2 years ago

Forward buffer cycling with bb would 'wrap around' to 0 once it reached the final document, but cycling backwards from the first document with B would continue into negative numbers and eventually crash once the buffer index got low enough. Wrap buffer cycling in both directions with modulo.

dsanson commented 2 years ago

Thanks!