3 ms·
> Affinity Just remember the line number you're on, rather than the byte. You already agreed for the cursor to operate in 2D space when storing the x-position.
by Etherlord87 2y ago
> Affinity
Just remember the line number you're on, rather than the byte. You already agreed for the cursor to operate in 2D space when storing the x-position. Also, you shouldn't operate on bytes, but on grapheme clusters, which solves the emoji problem.
> Emoji Modifiers
Come on, just don't allow a skin tone modifier to modify a newline, that's silly. Allow it to modify only what you can support it modifying, so emojis with alternate skin colors. The problem is what if you want to modify grapheme clusters, IMHO you should have a small (like with autocomplete suggestions) "magnifying" popup , where the cursor continues to move as it pauses in the main text, this however would be tricky to implement for a mouse - you can control and move the mouse but it may be annoying to many users; speaking of which...
> Bidirectional Text
"Proper" bidi behavior I find very confusing and annoying, with the selection splitting. IMHO there should be main text body with some direction, and within it *embeds*, and those embeds are selected in its entirety (you usually would select part of text body with the entire quote). Now you don't have surprising, unintuitive behavior of selection, and the implementation is easy. Of course embeds can have embeds within them, and if you start selection within the embed, you now treat it as full text body, allowing to select a fragment of it. The moment you leave the embed while dragging your mouse, the whole embed is selected (but just like with x-position, the selection anchor is remembered if you return to the embed), similarly to how the whole word is selected when you start selecting it but then move outside the word in Microsoft Office Word. And if you really need to select a fragment of the embed + something else, just select whole embed + something else, copy, paste, and delete the fragment you don't want and deal with it.