This fixes multiple comparisons between the buffer length and the cursor row. Also refactor the key-binding logic for better flexibility.
This fixes multiple comparisons between the buffer length and the cursor row. Also refactor the key-binding logic for better flexibility.