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

Get a different snippet code if just replace not delete the previous one #2250

Closed
yuyully opened this issue Dec 16, 2021 · 1 comment · Fixed by eclipse-jdtls/eclipse.jdt.ls#2912
Assignees

Comments

@yuyully
Copy link

yuyully commented Dec 16, 2021

Get a different snippet code if just replace not delete the previous one

Environment
  • Operating System: Win/Mac/Linux
  • JDK version: 11.0.12
  • Visual Studio Code version: 1.63.1
  • Java extension version: 1.2.0-486
Steps To Reproduce
  1. Create an empty java file
  2. Type cl and then select snippet for class
  3. Select all code lines(don't delete, just do replace) and type 'cl' again > select snippet for class
Current Result

Get different results at step 2 and step 3.
setp2:
image
step3:
image

Expected Result

Get a same result at step 2 and step 3

@rgrunber
Copy link
Member

rgrunber commented Sep 6, 2023

This is still an issue. @hopehadfield might be interested.

snippet-context-changing-bug

Note: I've found it easier to reproduce this if you save prior to deleting the content and triggering completion.

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

Successfully merging a pull request may close this issue.

4 participants