redhat-developer / redhat-developer/vscode-java

Autoimport on accepting a suggestion moves cursor when "quickSuggestions" is set to "inline"

Đang mở
#3,566 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

When a class is automatically imported as a result of accepting an "inline" suggestion, an import line is added at the top of the file which moves other lines down by 1 or 2. However, the cursor remains at the same position which makes it feel like the cursor was moved on autoimport. This problem does not occur if "quickSuggestions" is set to "on".

Environment
  • Operating System: Windows 10
  • Visual Studio Code version: 1.87.2
  • Java extension version: 1.29.0
Steps To Reproduce
  1. Set "editor.quickSuggestions": { "other": "inline" } in settings.json
  2. Start typing a name of a not imported class
  3. Accept the suggestion
  4. An import line appears moving other lines down. The cursor, however, doesn't move along

Here's a demonstration.

https://github.com/redhat-developer/vscode-java/assets/61470425/a8633375-7f19-4ecb-b4f9-920e813c9b59

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện vấn đề trong Visual Studio Code 1.87.2 với extension Java và thiết lập editor.quickSuggestions trong settings.json. So sánh việc chấp nhận một class chưa được import với inline và với on, sau đó theo dõi import được thêm vào ảnh hưởng như thế nào đến vị trí con trỏ. Hoàn tất khi con trỏ đi theo phần văn bản đã chấp nhận lúc một dòng import được chèn vào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, typescript, vscode
Lĩnh vực
developer-experience, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.