Skip to content

Commit

Permalink
Check mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Feb 5, 2025
1 parent d84e0db commit d76b7a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions denops/ddc/ddc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,11 @@ export class Ddc {
})(this);

const changedTick = vars.b.get(denops, "changedtick") as Promise<number>;
const mode = fn.mode(denops);
const cursor = fn.getcurpos(denops);
if (
context.changedTick !== await changedTick ||
context.mode !== await mode ||
!equal(context.cursor, await cursor)
) {
// Input is changed. Skip invalid completion.
Expand Down

0 comments on commit d76b7a6

Please sign in to comment.