Is the cursor position after double-click to select intentional?

When double-clicking a word to select the entire thing, the cursor doesn't always end up at the end. Instead, if you double-click somewhere in the first half of the word, the cursor ends up at the front of the word. If you double-click somewhere in the second half, it ends up at the end. GIF below.

anim_edited

I don't know whether this is a bug or a feature but I find it irritating that the selection behavior doesn't consistently place the cursor at the end of the word. The most common use case for me by far is double-clicking and then extending the selection to the right with Shift + Right Arrow. When the cursor ends up at the front of the word this means that I start unselecting the word I just clicked rather than extending the selection to the right. This behavior misaligns with what I'm used to in Chrome and Word and Notepad and basically everywhere else so it feels like it was added intentionally.

Do others find this functionality useful? Is it possible to disable this magic detection and always place the cursor at the end? It's a small thing but it's driving me a little crazy because I have to pay attention to exactly where I'm clicking relative to my best estimate of the middle of a word.

Thanks for pointing this out, William! I hadn't noticed it before, but I can definitely see the benefits of being able to choose which end the cursor ends up at. For example, one of the things I find awkward about how RStudio highlights on double-clicking is that underscore is treated (by default?) the same way the alphanumeric characters are, which means that double-clicking

very_long_variable_name

always selects the whole string rather than any of the individual words. This turns the left-right cursor-position choice into a benefit — in exactly the way you found unexpected — by allowing you to shrink the highlighted area to include, say, only the string "_variable_name" for deletion.

Since the left-right choice doesn't require precise identification of the ends of a string, I suspect the nuisance is more from getting used to the change in expected behavior than from any serious impediment it creates. Except for very short strings, of course, where it does require more precise clicking. I don't know if this behavior is customizable, but it would be nice if it were.

Yeah, customizing what exactly gets selected upon click would be helpful but I realize this is maybe too niche to be worth spending time on. FWIW, Word does split on underscores while Notepad and Chrome do not.