When deselect by arrow key, move cursor relative to its position, not to start or end of selection

Hello!
I found one very frustraiting moment - something is wrong with the selection of text. For example - i select some string and to move cursor on the next string i must press down key twice. Can i turn this off ? It’s very annoying for me.
Pressing down key, as usual deselects text and move cursor for the one press.
Thanks

3 Likes

To paraphrase: When a user has a selection, typing up, down, left, or right moves the cursor to the front or end of the selection as it deselects. In most text editors, the cursor would move up, down, left, or right relative to the cursor position - regardless of the selection - as it deselects the text.

This is how CodeMirror works. I went to test it in a CodeMirror sandbox, and it does it there too. codemirror-6 demo - CodeSandbox

I wish your title was a bit more descriptive. “Change selection mode” doesn’t explain the issue.

I see what you mean though. It is inconsistent with any other text editor I’ve used.

twopressesToMove

And here is an example of how it can really be jarring. Here I make a backwards selection and then press down. And my cursor goes to a completely different line and position (the end of my selection), instead of going down from where it was.

twopressesToMove2

3 Likes

Just wanted to add a minor note: this behavior doesn’t seem to apply to vi mode, where the arrow keys simply change the (visual mode) selection.

1 Like

I gave the thread a new title that is more descriptive, tho not necessarily clear. I wasn’t able to sum it up concisely.

3 Likes

I think you are right. Thanks. Can we change behaviour to standart somehow? Or we should wait of developers accept is as a “to be fixed” ?

Any news ?

I haven’t heard anything. There are hundreds of feature requests and this one only has 2 upvotes, so I wouldn’t expect action soon.

BTW - you are comparing moving cursor with “right key” after text was selected, but i more often use down key (or maybe up), so ordinary editors moves cursor to the next string and deselect text with one press. Obsidian makes us press down key twice. Deselecting is happend but cursor says on the same string, not moving to the next.

No news still ? Is it so hard to fix ?

There are never progress updates, unless you see it on the roadmap. If it is addressed and fixed, it will be announced here. Please do not repeatedly bump the thread asking for updates. That is against our code of conduct for “campaigning”.

1 Like