Skip to content

Sometimes autoComplete words deleted the next letter #3892

Closed

Description

@zamaniafshar

Versions (please complete the following information):

  • VS Code version: 1.65.2 (user setup)
  • Dart extension version: v3.36.0
  • Dart/Flutter SDK version: 2.5.2
bandicam.2022-03-25.11-38-37-465.mp4

After selecting suggestion, it deletes the next letter but if i use ctrl + z and then selecet the suggetion it works fine

This is not just happening to me, other vscode users are having the same problem

How can i fix it?

Thanks

Activity

  1. DanTup commented on Mar 30, 2022

    @DanTup
    Member

    Do you have precise steps to trigger this? The behaviour seems a bit like this VS Code issue:

    microsoft/vscode#134013

    However it's hard to say if the cause is the same because it's not clear what happened prior to start of the video. If you can reliably reproduce it, does it happen in a new project or only this one?

    Things that I might affect it:

    • The editor.autoClosingBrackets setting
    • The editor.acceptSuggestionOnCommitCharacter setting
    • Whether you pressed ( to accept the Text(...) from completion before this happened
  2. added
    awaiting infoRequires more information from the customer to progress
    on Mar 30, 2022
  3. zamaniafshar commented on Mar 30, 2022

    @zamaniafshar
    Author

    I realized it's happen when i'm coding very fast and i have a weak computer mabey that's why it's happens rarely
    But it happens in all of my projects
    I opened a issue as vscode bug but they sayed it's dart/flutter extensions bugs:
    microsoft/vscode#146065

    It's not just delete ( it also deletes , or '
    Even sometimes it suggest me a named parameter without : and when i press Tap and then press ctrl + z it's work as expected

    Before:

    Untitled

    Then:

    Untitled

    I tried to change those settings and still i have that bug

  4. DanTup commented on Mar 30, 2022

    @DanTup
    Member

    Thanks for the info - I've commented on the VS Code issue to see if there's a way to capture more info from VS Code (although it's true the Dart server provides the range, VS Code also adjusts it as you type to compensate for the newly inserted characters).

    I'll have a go at trying to repro this with some automated tests that update the document quickly while requesting completions, to see if I can trigger this.

  5. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    and removed
    awaiting infoRequires more information from the customer to progress
    on Mar 30, 2022
  6. zamaniafshar commented on Mar 31, 2022

    @zamaniafshar
    Author

    Thanks
    I hope this problem is fixed it's so annoying

  7. DanTup commented on Mar 31, 2022

    @DanTup
    Member

    I was able to reproduce this in a test and believe I have an understanding of the issue - there is some asynchronous code in compiling the completion list, which leaving a small window for the edit from your "next" keystroke to be processed before the completion list. This means the range in the completion items is more up-to-date than VS Code expects, which throws off the changes it makes to compensate for your typing.

    We're discussing some possible ways to fix it, but unfortunately they may not be trivial.

  8. added this to the v3.39.0 milestone on Mar 31, 2022
  9. zamaniafshar commented on Apr 23, 2022

    @zamaniafshar
    Author

    Hello
    Did this problem fixed?
    It's still annoying😥😕

  10. DanTup commented on Apr 26, 2022

    @DanTup
    Member

    I believe (hope?) the issue is fixed by dart-lang/sdk@b246470. That change is not in a stable release of Dart or Flutter yet though.

  11. zamaniafshar commented on Apr 27, 2022

    @zamaniafshar
    Author

    I believe (hope?) the issue is fixed by dart-lang/sdk@b246470. That change is not in a stable release of Dart or Flutter yet though.

    Thanks

  12. DanTup commented on May 2, 2022

    @DanTup
    Member

    Closing this as I believe it's all fixed, but please let me know if you're still seeing this after the next stable SDK releases go out. Thanks!

  13. zamaniafshar commented on Jul 4, 2022

    @zamaniafshar
    Author

    Closing this as I believe it's all fixed, but please let me know if you're still seeing this after the next stable SDK releases go out. Thanks!

    I still have this problem :(

  14. DanTup commented on Jul 6, 2022

    @DanTup
    Member

    @MohammadAminZamaniAfshar can you confirm the exact version of your Flutter SDK?

  15. DanTup commented on Jul 6, 2022

    @DanTup
    Member

    Oh, I just checked and the fix above did not make the branch for the last stable release of Dart/Flutter. So if you're on stable, the issue may still exist. I would expect it to be resolved in the next stable (non-hotfix) release though.

  16. zamaniafshar commented on Jul 7, 2022

    @zamaniafshar
    Author

    @MohammadAminZamaniAfshar can you confirm the exact version of your Flutter SDK?
    My Flutter SDK version is 3.0.3

  17. DanTup commented on Jul 7, 2022

    @DanTup
    Member

    @MohammadAminZamaniAfshar thanks - see my last comment above. It turns out the fix missed the branch for the last stable release, so it should show up in the next (non-hotfix) stable release.

  18. zamaniafshar commented on Jul 7, 2022

    @zamaniafshar
    Author

    Oh, I just checked and the fix above did not make the branch for the last stable release of Dart/Flutter. So if you're on stable, the issue may still exist. I would expect it to be resolved in the next stable (non-hotfix) release though.

    I hope.
    Thank you

  19. DanTup commented on Jul 7, 2022

    @DanTup
    Member

    If after the next stable release you're still seeing this, please do let me know!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions