aaronjanse / 3mux

Terminal multiplexer inspired by i3
MIT License
1.82k stars 46 forks source link

fix wrapping at bottom of pane #116

Closed aaronjanse closed 3 years ago

aaronjanse commented 3 years ago

By definition, we're at the bottom of the scrolling region when v.Cursor.Y == v.scrollingRegion.bottom - 1: https://github.com/aaronjanse/3mux/blob/e2945b0b554cf4af8a7eb409f800ec8dd89a9039/vterm/vterm.go#L16-L17

This fixes related off-by-one error. It also tells 3mux to scroll when wrapping at the bottom right corner of a scrolling region.

Test case, when run in a shell with a prompt at the bottom of a pane:

seq 1 1 100 | paste -s -d+