refactor: move event to selection change manager
This commit is contained in:
parent
b784a2913a
commit
6a0eaa472c
1 changed files with 6 additions and 2 deletions
|
|
@ -125,9 +125,13 @@ export class GhostTextAcceptanceTracker {
|
|||
manager.registerListener(
|
||||
"ghostTextTracker",
|
||||
async (e, state) => {
|
||||
if (!state.document || !state.cursorPosition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const wasGhostTextAccepted = this.checkGhostTextWasAccepted(
|
||||
e.textEditor.document,
|
||||
e.selections[0].active,
|
||||
state.document,
|
||||
state.cursorPosition,
|
||||
);
|
||||
|
||||
if (wasGhostTextAccepted) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue