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

Editing assist has different behavior depending on whitespace #877

Open
mit-mit opened this issue Apr 4, 2017 · 6 comments
Open

Editing assist has different behavior depending on whitespace #877

mit-mit opened this issue Apr 4, 2017 · 6 comments
Milestone

Comments

@mit-mit
Copy link
Member

mit-mit commented Apr 4, 2017

Steps to Reproduce

  1. Create a new project
  2. Move to line 76, place the cursor inside Text and press Alt-Enter
  3. Select the 'Wrap' assist
  4. Enter Ro and press Tab to complete to Row

=> Cursor moves to 'child', and 'child' is in a red box suggesting you have to complete it

  1. Close project. Create a new project
  2. Move to line 79, place the cursor inside Text and press Alt-Enter
  3. Select the 'Wrap' assist
  4. Enter Ro and press Tab to complete to Row

=> Cursor moves to right after Row(. Subsequent Tab presses just adds empty tabs stops

Version info

Flutter plugin version 12 in IDEA version 2017.1 on Windows.

@mit-mit
Copy link
Member Author

mit-mit commented Apr 4, 2017

@alexander-doroshko is this a Flutter/Dart issue or a platform issue?

@mit-mit
Copy link
Member Author

mit-mit commented Apr 4, 2017

CC @stevemessick

@alexander-doroshko
Copy link
Contributor

Looks like an IntelliJ's issue, not sure at the moment, Dart plugin or Live Templates engine.

@stevemessick
Copy link
Member

I checked the server log file. There is not much difference in the assists returned in the two examples. Minor text and file offsets, as expected, but no structural differences in the JSON.

The linked edit groups do not work when there is a newline between the first and second. They do work when both are on the same line. Linked edit groups in live templates (like stful) work even with newlines. I'm guessing it is something in the Dart plugin at this point.

@scheglov Do you know of any issues with linked editing in assists?

@scheglov
Copy link
Contributor

scheglov commented Apr 4, 2017

No, I'm not aware about such problems with linked editing.

@stevemessick
Copy link
Member

More observations:

  • If you type 'Row' then ESC to dismiss the completion pop-up menu the linked editing works as expected in both examples.

  • If you add a newline after Text( in the first example then it fails to work just as the second example does.

  • If you enable to preference to select the completion by typing dot, space, etc then the linked editing is never invoked in either case, when you select the completion by typing one of the new characters. (Preferences > Editor > General > Code Completion)

  • If you disable the preference named 'Autopopup code completion' then linked editing works as expected in both cases.

@devoncarew devoncarew added this to the Backlog milestone May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants