This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Example: In "foo.bar", when the caret is at the beginning of "bar" (= behind the dot), then Select Word selects the dot instead of the word "bar". This seems to happen for any sequence of non-word and non-whitespace characters that precede a word.
Well, I'm not sure why 'Select word' action does what it does. But there is also 'Select identifier' actions (Alt+Shift+J by default) which might be more suitable for what you need.
Thanks for suggesting Select Identifier. I didn't think it would work in plain text files and on non-identifier words, but apparently it does, so it seems to be a good workaround. Maybe Select Identifier and Select Word should be the same, the difference (if any) seems rather subtle.
Bug prior to 7.0, not touched for the last 2 years --> P4.
Milutin, can you please have a look at this? Thanks.
Select word action is by default used only for double-click. It is wrapper for BeginWordAction and selectEndWordAction. I am not sure what should be changed? 1, not showing select word action in keymap? It has not a shortcut by default. 2, change behavior of double-click? in case of 'test-|test' where | is caret, it should not select '-' but second 'test'?
I think option 1. is good - is it an easy change? If so please do it. Thanks.
IMHO the current state is ok - you want to select words by double-clicking it and not only identifiers but block of separators as well. If you want select just identifier there's Alt+Shift+J (select identifier) action. We should probably compare with other IDEs too what's their approach to this.
The current state is confusing because: - Two slightly different word-selection variants are provided in the keymap - The one called "Select Word" does not always select a word when the caret is on a word boundary, unlike most other text editors - The one called "Select Identifier" actually selects any word, not just identifiers - When other text editors have an action called "Select Word", its behavior usually corresponds to the behavior of NetBeans' "Select Identifier", not to the behavior of NetBeans' "Select Word" One problem is that (presuambly) a double-click first maps to a character position, and the behavior of the action then can only depend on this character position. Therefore clicking in the middle of a character necessarily does the same as a keyboard action where the caret is visually _between_ characters (if not in overstrike mode). If the distinction would me more granular than just "character position", then having just a single action would maybe suffice. But that's probably too subtle/difficult to implement. Therefore I would suggest to rename "Select Identifier" to "Select Word", and either not show the original "Select Word" in the keymap, or to rename it to e.g. "Select Previous Word" (reflecting that it does not select the next word when the caret is at the beginning of a word).
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss
Still reproducable in current dev build.