feat: reset edit chain id to null
This commit is contained in:
parent
51818bffee
commit
3d0ef7afbc
1 changed files with 14 additions and 0 deletions
|
|
@ -42,6 +42,7 @@ import { VsCodeIde } from "../VsCodeIde";
|
|||
import { ConfigYamlDocumentLinkProvider } from "./ConfigYamlDocumentLinkProvider";
|
||||
import { VsCodeMessenger } from "./VsCodeMessenger";
|
||||
|
||||
import { NextEditProvider } from "core/nextEdit/NextEditProvider";
|
||||
import setupNextEditWindowManager, {
|
||||
NextEditWindowManager,
|
||||
} from "../activation/NextEditWindowManager";
|
||||
|
|
@ -368,6 +369,19 @@ export class VsCodeExtension {
|
|||
}
|
||||
});
|
||||
|
||||
// TODO: check if next edit provider's chain id is cleared properly.
|
||||
// Listen for editor changes to clean up decorations when editor closes.
|
||||
vscode.window.onDidChangeVisibleTextEditors(async () => {
|
||||
// If our active editor is no longer visible, clear decorations.
|
||||
NextEditProvider.currentEditChainId = null;
|
||||
});
|
||||
|
||||
// Listen for selection changes to hide tooltip when cursor moves.
|
||||
vscode.window.onDidChangeTextEditorSelection(async (e) => {
|
||||
// If the selection changed in our active editor, hide the tooltip.
|
||||
NextEditProvider.currentEditChainId = null;
|
||||
});
|
||||
|
||||
// Refresh index when branch is changed
|
||||
void this.ide.getWorkspaceDirs().then((dirs) =>
|
||||
dirs.forEach(async (dir) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue