Skip to content

Commit

Permalink
dduのwaitの仕方を変えた
Browse files Browse the repository at this point in the history
  • Loading branch information
kuuote committed Feb 10, 2025
1 parent 9370c8a commit 689e54d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions autoload/p/ddu.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function p#ddu#wait()
let chars = ''
while v:true
let char = getcharstr(0)
let chars ..= char
sleep 1m
if get(g:, 'vimrc#ddu#ready', v:false)
break
endif
endwhile
call feedkeys(chars, 'it')
endfunction
2 changes: 1 addition & 1 deletion autoload/p/ddu/ff.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function p#ddu#ff#wait(startfilter = v:false)
endfunction

function p#ddu#ff#start(options, startfilter = v:false)
call denops#plugin#wait('ddu')
call p#ddu#wait()
call ddu#start(a:options)
call p#ddu#ff#wait(a:startfilter)
endfunction
7 changes: 6 additions & 1 deletion conf/plug/ddu/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,12 @@ export class Config extends BaseConfig {
async config(args: ConfigArguments) {
await autocmd.group(args.denops, augroup, (helper) => {
helper.remove("*");
helper.define("User", "vimrc#ddu#ready", ":", { once: true });
helper.define(
"User",
"vimrc#ddu#ready",
"let g:vimrc#ddu#ready = v:true",
{ once: true },
);
});
mainConfig(args);
await selectorConfig(args);
Expand Down

0 comments on commit 689e54d

Please sign in to comment.