Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double-click select word wrong behavior #212

Closed
boozook opened this issue Apr 5, 2015 · 4 comments
Closed

Double-click select word wrong behavior #212

boozook opened this issue Apr 5, 2015 · 4 comments

Comments

@boozook
Copy link

boozook commented Apr 5, 2015

Double-click must select one word in any expression.
Instead it we have unpredictable behavior:

dclick mov opt
In this demo I use only:

  • double-click for demonstration issue;
  • single click for deselecting text;

Also: full string (expr) must be selected on triple-click if needed but not on double-click.

TIR: STB-9373

@boozook
Copy link
Author

boozook commented May 20, 2015

Works correctly (better) in latest release.

@sganapavarapu1
Copy link
Contributor

sganapavarapu1 commented Mar 17, 2017

This works for most cases except for strings -
still does not allow me to select individual words inside a string literal.

var foo = "one two three four five";

if I place cursor on any single-word inside that string and double-click, it will select entire string - annoying because this is a common usecase

@EricBishton
Copy link
Member

Fixes in #644.

@EricBishton
Copy link
Member

There is still one weird circumstance that occurs, but it's a very limited edge case: If you double-click on the second asterisk at the beginning of a doc comment, only the text of the comment will be selected. (In the normal case, when selecting a beginning or end token, the selection will be extended to entire lines if they are multi-line comments.) This is because the Java comment selectioner (a horrible name) also handles the selection, and IDEA takes the most specific (smallest) one. We could eliminate that if we changed doc comments to NOT be PsiComments, but that brings with it many other issues.

I'm going to close this. The functionality will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants