From fbabdc7559c282aa15e6a179cb6af79899650bd8 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Tue, 1 Aug 2023 09:06:02 +0900 Subject: [PATCH] Add Ddu:redraw autocmd --- denops/ddu/ddu.ts | 2 ++ doc/ddu.txt | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/denops/ddu/ddu.ts b/denops/ddu/ddu.ts index fcfe330..ca8a73d 100644 --- a/denops/ddu/ddu.ts +++ b/denops/ddu/ddu.ts @@ -2181,6 +2181,8 @@ async function uiRedraw< if (ddu.shouldStopCurrentContext()) { await ddu.uiQuit(denops, ui, uiOptions, uiParams); } + + await denops.cmd("doautocmd User Ddu:redraw"); } catch (e: unknown) { if (e instanceof Error && e.message.includes(" E523: ")) { // NOTE: It may be called on invalid state diff --git a/doc/ddu.txt b/doc/ddu.txt index a072a25..75684e2 100644 --- a/doc/ddu.txt +++ b/doc/ddu.txt @@ -33,6 +33,7 @@ Actions |ddu-actions| Action params |ddu-action-params| Action flags |ddu-action-flags| Types |ddu-types| +Autocmds |ddu-autocmds| Create UI |ddu-create-ui| UI attributes |ddu-ui-attributes| Create source |ddu-create-source| @@ -953,6 +954,16 @@ Please see the TypeScript definition. https://deno.land/x/ddu_vim/types.ts?doc +============================================================================== +AUTOCMDS *ddu-autocmds* + +ddu.vim defines some |User| autocmds. + + *ddu-autocmd-Ddu:redraw* +Ddu:redraw + Called after |ddu-ui-attribute-redraw| is called. + + ============================================================================== CREATE UI *ddu-create-ui*