ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
49 stars 5 forks source link

TextBox cursor is rendered wrong at the end of a full line #112

Closed ulyssa closed 1 year ago

ulyssa commented 1 year ago

When a wrapped line is exactly the width of the area in which it's rendered, and the cursor is placed at the end of that line, then the cursor should be shown in the first column on the following terminal row, to visually indicate that we've wrapped. Instead, it currently shows an empty line for the wrapped line, but the cursor is placed all the way at the end of the text area. I'm also going to fix has_lines() to more nicely grow a TextBox when a line gets wrapped during typing.