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

Caret doesn't move to a new widget when using "Wrap with widget..." command #3015

Closed
kubaprzetakiewicz opened this issue Dec 16, 2020 · 3 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug
Milestone

Comments

@kubaprzetakiewicz
Copy link

Describe the bug
When using the context menu to wrap the widget in another widget, the caret doesn't move to the new parent anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Position the caret inside the widget name
  2. Open the context menu / Fixes menu via either the bulb or Cmd + .
  3. Choose Wrap with widget...
  4. Observe the caret staying at the original place instead of moving to the new widget parent - this was super useful for quick selection expansion to cover the whole word.

Expected behavior
The caret should move to the new, enclosing widget.

Screenshots
screen recording of the issue

Versions

VS Code version:

Version: 1.52.0
Commit: 940b5f4bb5fa47866a54529ed759d95d09ee80be
Date: 2020-12-10T22:46:53.673Z (5 days ago)
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.1.0

Dart extension version:
dart-code.dart-code - v3.17.1
dart-code.flutter - v3.17.0

Dart/Flutter SDK version:

[✓] Flutter (Channel master, 1.25.0-9.0.pre.88, on macOS 11.0.1 20B50 darwin-x64, locale en-GB)
    • Flutter version 1.25.0-9.0.pre.88 at /Users/kubcio/.flutter
    • Framework revision e24e763872 (4 hours ago), 2020-12-16 07:33:03 -0500
    • Engine revision e9f2f0eaea
    • Dart version 2.12.0 (build 2.12.0-157.0.dev)
@chreck
Copy link

chreck commented Dec 16, 2020

I have the same issue with this environment. I reset all my dart settings and it was working again. I had LSP enabled.

Versions

VS Code version:

Version: 1.52.0
Commit: 940b5f4bb5fa47866a54529ed759d95d09ee80be
Date: 2020-12-10T22:46:53.673Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.2.0

Dart extension version:

dart-code.dart-code - v3.17.1
dart-code.flutter - v3.17.0

Dart/Flutter SDK version:

Flutter 1.22.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7891006299 (6 days ago) • 2020-12-10 11:54:40 -0800
Engine • revision ae90085a84
Tools • Dart 2.10.4

@DanTup DanTup added blocked on vs code / lsp / dap Requires a change in VS Code to progress in lsp/analysis server Something to be fixed in the Dart analysis server labels Dec 17, 2020
@DanTup DanTup added this to the Backlog milestone Dec 17, 2020
@DanTup
Copy link
Member

DanTup commented Dec 17, 2020

In LSP we don't currently have a way to set the selection for a code action. There's an open issue at microsoft/language-server-protocol#724 - please add 👍 's!

@DanTup DanTup modified the milestones: Backlog, v3.48.0 Aug 8, 2022
@DanTup DanTup added in editor Relates to code editing or language features and removed blocked on vs code / lsp / dap Requires a change in VS Code to progress labels Aug 25, 2022
@DanTup
Copy link
Member

DanTup commented Aug 25, 2022

This has been fixed:

Aug-25-2022 16-16-50

@DanTup DanTup closed this as completed Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug
Projects
None yet
Development

No branches or pull requests

4 participants
@DanTup @chreck @kubaprzetakiewicz and others