I can't make any sensible comment about the BB4W editor, I don't use it. As best I recall how the code works (which is hardly at all, I haven't looked at it for 15 years or so!) it uses the Uniscribe API to do the heavy-lifting as far as Complex and RTL scripts are concerned. Maybe the behaviour you describe stems from that, but I don't know.JeremyNicoll wrote: ↑Sat 05 Aug 2023, 08:35 in the BB4W editor the length of the selected area is unchanged.
What I can say is that SDLIDE, which of course I'm more familiar with and have had to code at a lower level (SDL2_ttf and Harfbuzz sadly don't provide the same kind of functionality as Uniscribe in Windows), uses the common 'caret and anchor' method for selection. That is, two points within the text are identified: the caret (which is where the flashing cursor appears) and the anchor.
The region between the caret and the anchor is selected (highlighted). Moving the caret (by pretty much any means) with a Shift key held down leaves the anchor position unchanged. Moving the caret without a Shift key held down moves the anchor to the same position as the caret, and therefore removes any selection.
Dragging with the mouse (i.e. holding the left-button) behaves like moving the caret whilst pressing a Shift key.
So you should find that SDLIDE consistently follows this rule, but if you notice any anomalies let me know. Do bear in mind that if you are running in Linux (or a Raspberry Pi) you need SDL_ttf version 2.20.0 or later to have been installed from the repository - or built from source - for the Right-to-Left and Complex Script functionality to work.