@@ -519,7 +519,6 @@ export class Ddc {
519519
520520 await ( async function write ( ddc : Ddc ) {
521521 await batch ( denops , async ( denops : Denops ) => {
522- await vars . g . set ( denops , "ddc#_changedtick" , context . changedTick ) ;
523522 await vars . g . set ( denops , "ddc#_complete_pos" , completePos ) ;
524523 await vars . g . set ( denops , "ddc#_items" , items ) ;
525524 await vars . g . set ( denops , "ddc#_sources" , options . sources ) ;
@@ -532,14 +531,9 @@ export class Ddc {
532531 }
533532 } ) ( this ) ;
534533
535- const changedTick = vars . b . get ( denops , "changedtick" ) as Promise < number > ;
534+ const input = denops . call ( "ddc#util#get_input" , context . event ) ;
536535 const mode = fn . mode ( denops ) ;
537- const cursor = fn . getcurpos ( denops ) ;
538- if (
539- context . changedTick !== await changedTick ||
540- context . mode !== await mode ||
541- ! equal ( context . cursor , await cursor )
542- ) {
536+ if ( context . input !== await input || context . mode !== await mode ) {
543537 // Input is changed. Skip invalid completion.
544538 await this . hide ( denops , context , options ) ;
545539 return ;
0 commit comments