docs: add comments to window manager
This commit is contained in:
parent
2007d0a410
commit
2baa9a3725
1 changed files with 5 additions and 12 deletions
|
|
@ -97,6 +97,11 @@ export const HIDE_NEXT_EDIT_SUGGESTION_COMMAND =
|
|||
export const ACCEPT_NEXT_EDIT_SUGGESTION_COMMAND =
|
||||
"continue.nextEditWindow.acceptNextEditSuggestion";
|
||||
|
||||
/**
|
||||
* This is where we create SVG windows and deletion decorations for non-FIM next edit suggestions.
|
||||
* This class controls the decoration object lifetime.
|
||||
* The syntax highlighting and the actual building of SVG happens inside core/codeRenderer/CodeRenderer.ts.
|
||||
*/
|
||||
export class NextEditWindowManager {
|
||||
private static instance: NextEditWindowManager | undefined;
|
||||
|
||||
|
|
@ -492,9 +497,6 @@ export class NextEditWindowManager {
|
|||
this.mostRecentCompletionId = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept the current next edit suggestion by inserting it at cursor position.
|
||||
*/
|
||||
/**
|
||||
* Accept the current next edit suggestion by inserting it at cursor position.
|
||||
*/
|
||||
|
|
@ -840,15 +842,6 @@ export class NextEditWindowManager {
|
|||
editor: vscode.TextEditor,
|
||||
position: vscode.Position,
|
||||
): vscode.Position {
|
||||
// Create a position that's offset spaces to the right of the cursor.
|
||||
|
||||
// const line = editor.document.lineAt(position.line);
|
||||
// const offsetChar = Math.min(
|
||||
// position.character + SVG_CONFIG.cursorOffset,
|
||||
// line.text.length,
|
||||
// );
|
||||
// return new vscode.Position(position.line, offsetChar);
|
||||
|
||||
// Place decoration at the end of the current line
|
||||
const line = editor.document.lineAt(position.line);
|
||||
return new vscode.Position(position.line, line.text.length);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue