This fixes multiple comparisons between the buffer length and the cursor row. Also refactor the key-binding logic for better flexibility.
This adds a simple text editor with basic visual line-editing capabilities.