angstsmurf / spatterlight

Updated fork of Spatterlight
GNU General Public License v3.0
105 stars 5 forks source link

Square text cursor #39

Open angstsmurf opened 2 years ago

angstsmurf commented 2 years ago

The standard macOS line shaped caret does look out of place in the DOSBox and MS-DOS themes, but changing this is harder than one might think. Simply drawing the square at the right place is tricky enough, but a worse problem is extending the text view with one line and moving down the cursor when it reaches the right edge, so that the cursor square won't be off-screen or out in the margin.

One way to implement this would be to simply have an extra square character at the end of the text storage whenever line input is active. We already have lots of code in place to only make the last line of text editable, which could be extended to also not make the last character editable. There would have to be a different mechanism to handle the cursor when it is not at the end, but inside the text covering one letter.