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
fzzr- opened this Issue Apr 5, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@fzzr-

fzzr- 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

@fzzr-

This comment has been minimized.

Show comment
Hide comment
@fzzr-

fzzr- May 20, 2015

Works correctly (better) in latest release.

fzzr- commented May 20, 2015

Works correctly (better) in latest release.

@sganapavarapu1

This comment has been minimized.

Show comment
Hide comment
@sganapavarapu1

sganapavarapu1 Mar 17, 2017

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@EricBishton

EricBishton Jun 8, 2017

Member

Fixes in #644.

Member

EricBishton commented Jun 8, 2017

Fixes in #644.

@EricBishton

This comment has been minimized.

Show comment
Hide comment
@EricBishton

EricBishton Jun 9, 2017

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.

Member

EricBishton commented Jun 9, 2017

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.

@EricBishton EricBishton closed this Jun 9, 2017

@EricBishton EricBishton added the Fixed label Jun 9, 2017

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