Bug 473550 - Select word right and left includes space
Summary: Select word right and left includes space
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: part (other bugs)
Version First Reported In: 23.04.3
Platform: Mint (Ubuntu based) Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-20 01:09 UTC by Robbie
Modified: 2023-08-27 16:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robbie 2023-08-20 01:09:52 UTC
SUMMARY
***
Select word right (ctrl+shift+right) or left (ctrl+shift+left) includes spaces in the selection
***


STEPS TO REPRODUCE
1. Type two strings separated by a space
2. Start at the beginning of the left-most string and press ctrl+shift+right
3. Clear selection and start at the end of the right-most string and press ctrl+shift+left

OBSERVED RESULT
In both cases, the space between the strings is selected along with the strings

EXPECTED RESULT
Only the string up to the space would be selected, similar to what would be selected if double clicking on the string

SOFTWARE/OS VERSIONS
Linux: 5.15.0-79-generic
(available in About System)
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Comment 1 Christoph Cullmann 2023-08-21 18:33:34 UTC
This seems to be a feature of the CamelCursor implementation we have.
Comment 2 Waqar Ahmed 2023-08-21 18:47:26 UTC
Related post: https://forum.qt.io/topic/148039/how-can-i-change-the-word-separators-in-qtcreator/2
And possibly the likely source of this bug.

Personally I like the way it works  currently and I doubt I want to change it anytime soon. Also We haven't had any complaints about this ever since it was introduced around ~3 years ago.
Comment 3 Christoph Cullmann 2023-08-21 20:18:26 UTC
(In reply to Waqar Ahmed from comment #2)
> Related post:
> https://forum.qt.io/topic/148039/how-can-i-change-the-word-separators-in-
> qtcreator/2
> And possibly the likely source of this bug.
> 
> Personally I like the way it works  currently and I doubt I want to change
> it anytime soon. Also We haven't had any complaints about this ever since it
> was introduced around ~3 years ago.

That is fine for me. I am not sure what really is better, if somebody steps up to make that configurable I guess that would be  ok.
Comment 4 Robbie 2023-08-21 20:46:09 UTC
I did some testing and found that the rest of the Kate and KWrite interfaces include the space when selecting like this.  I looked a little further both on my work computer (Win10) and home (Linux Mint) and found the following:

Applications that do not include space:
Notepad++
VSCode
Geany
xed
Firefox
Chrome
Gnote
Claws Mail

Applications that do include space:
Visual Studio
SSMS
Windows Notepad
Microsoft Office applications
QT Creator
LibreOffice
KAlarm
KDiff3

So it looks like it's consistent with KDE and other Qt-based interfaces to include the space.  I don't personally like it, but I think that it makes sense to remain consistent with other KDE and Qt applications, so I support closing the bug and leaving things as is.
Comment 5 Christoph Cullmann 2023-08-27 16:17:09 UTC
Ok, thanks for the overview. I will close the bug, I still would have no issue if we have there more ways to configure that, but only if we get some patch for that.