Problem with text selection using CTRL + right arrow

Imagine a text line like:

aaa bbb ccc ddd

(words separated with tabs and/or spaces)

If you are e.g. at word “aaa” and use CTRL+right-arrow to select ONLY the word, the selection also takes the spaces/tabs behind the word.
Why???
This is NOT desired/correct, how to stop this?

Btw, if you are at the right-end of a word like “ddd” and use CTRL+arrow-left, the selection is OK, no tabs/spaces :wink:

Thx.

Ctrl+right arrow takes the cursor to the start of the next word, combined with Shift, it will select up to the next word. Pretty much all software that I have worked with, works that way.

I work with MS-Word or NotePadPro for many years … they don’t select spaces/tabs after the end of word.
Which is logical to me.

If I copy such a selection, the tabs/spaces are also copied and I don’t really need them after paste operation.

This behavior should be either changed or get an option to disable it.

By the way, I just learned that there is a Select Word function (.uno:SelectWord) that can be assigned to a shortcut. But it only selects the word in which the cursor is.

EDIT: One more: Give a try to F8 (.uno:SelectionCycle). Version 7.2.3.2 on Linux.

I don’t understand your procedure.

Ctrl+“arrow” is not a selection command but a navigation one. Use left or right arrow will move the cursor to the beginning of respectively previous or next word.

To select something you need to use also the Shift key. This will collect everything from the initial position to the final position. It does not change the meaning of the navigation command and consequently will include the separators.

A dedicated gesture exists to select a word: double-click. However this presents the inconvenience of leaving the keyboard for the mouse then back.

If you think the interpretation of the navigation command should be changed when the Shift key is also depressed, you can submit a feature request on Bugzilla.

2 Likes

Yes, I am using SHIFT for the selection.
If you don’t use SHIFT, you see the same result: the new cursor position is wrong => not at the end of the word, it also takes spaces/tabs behind.

CTRL+SHIFT+arrow is a normal selection operation in Windows since many years and works properly in Word and many text editors.

I usually need to select several words, so double click is not an option … and I am faster using keys and use them always if possible.

Yes, I think the selection using CTRL+SHIFT+right-arrow (or just the cursor jump, without SHIFT) should be fixed: it should end at the end of the word … not taking all spaces/tabs behind.

(the same thing using left-arrow is correct)

Thanks.

No, it’s not “wrong”, it is another choice: move to beginning of word. And all other issues derive from this.

However, Writer tries to implement “smart” copy & paste which also implies some modification on selection. You might then propose some specification on Bugzilla (link in my answer) and see how it is discussed and received.

You could Ctrl+Shift+ several times plus a final Shift+“left arrow” to eliminate the last separator.

This works for the last separator only, but if you have many spaces/tabs after the last word, you need many additional clicks :wink:

Of course!