Beat icon indicating copy to clipboard operation
Beat copied to clipboard

Small inconvenience: END jumps past hidden stuff on next line

Open ftolsson opened this issue 2 years ago • 2 comments

A small quirk with hidden Fountain markup:

With hide markup OFF, and the caret at the beginning of the character name in this text:

                CHARACTER
     _Well?_

and you hit END (or cmd + right arrow) the caret, as expected, goes to the right of the word character: CHARACTER |

But if you turn it ON, hitting END will send the caret to the next line and past the hidden underscore, like this:

                CHARACTER
     _|Well?_

This is also true for asterisks. I'm guessing Beat should rather check where this line ends, but now probably checks where next begins?

ftolsson avatar May 11 '22 16:05 ftolsson

This is the inferred behavior of NSTextView. It moves around by DRAWN glyphs. Because these glyphs are drawn only when the cursor is on the actual line, text view has hard time understanding which index is which.

I'll have to study if I can somehow circumvent this.

lmparppei avatar May 12 '22 18:05 lmparppei

Get it. But does it really need to check what's on the next line to correctly end up after the last glyph on this, though? I'm thinking that the the "after last glyph, but before CR" logic should look the same regardless?

ftolsson avatar May 13 '22 04:05 ftolsson