redhat-developer / redhat-developer/vscode-java

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

オープン
#3,566 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Java 拡張機能と settings.jsoneditor.quickSuggestions 設定を使用して、Visual Studio Code 1.87.2 で問題を再現します。未インポートのクラスを inlineon で受け入れた場合を比較し、その後、追加された import がカーソル位置にどのように影響するかを追跡します。import 行が挿入されたときにカーソルが受け入れたテキストに追従すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, typescript, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。