Following :h ddu-ui-ff-fqq-25, I set autocmd like bellow.
autocmd User Ddu:uiDone ++nested call ddu#ui#async_action('openFilterWindow')
First, calling ddu#start() work fine. Filter window is automatically opened.
However quit the ddu window and then re-call ddu#start(), filter windows does not appeared.
It seems that Ddu:uiDone event was triggered only once.
Expected
Ddu:uiDone should triggered evey time ddu#start().
Environment Information
ddu.vim version (SHA1): bec4b273b5a4ee133f15178ce07c68ceaace3e39
denops.vim version (SHA1): 09e64956c2946bba0a060d0a0aaddde106753bd9
deno version(deno -V output): deno 1.44.1
OS: Arch Linux
neovim :version output:
NVIM v0.10.0-dev-3122+ga0a189a8ed
Build type: RelWithDebInfo
LuaJIT 2.1.1716656478
Run ":verbose version" for more info
vim :version output:
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jun 17 2024 22:29:09)
Included patches: 1-496
Compiled by Arch Linux
Provide a minimal init.vim/vimrc without plugin managers (Required!)
syntax enable
filetype plugin indent on
set rtp^=~/tmp/dduuiffmin/ddu-filter-matcher_substring
set rtp^=~/tmp/dduuiffmin/ddu-kind-file
set rtp^=~/tmp/dduuiffmin/ddu-source-line
set rtp^=~/tmp/dduuiffmin/denops.vim
set rtp^=~/tmp/dduuiffmin/ddu.vim
set rtp^=~/tmp/dduuiffmin/ddu-ui-ff
call ddu#custom#patch_global(#{
\ ui: 'ff',
\ sourceOptions: #{
\ _: #{
\ matchers: ['matcher_substring'],
\ },
\ },
\ })
function! s:ddu_my_settings() abort
nnoremap <buffer><silent> <CR> <Cmd>call ddu#ui#do_action('itemAction', {'name': 'open'})<CR>
nnoremap <buffer><silent> i <Cmd>call ddu#ui#do_action('openFilterWindow')<CR>
nnoremap <buffer><silent> q <Cmd>call ddu#ui#do_action('quit')<CR>
endfunction
autocmd FileType ddu-ff call s:ddu_my_settings()
nnoremap L <Cmd>call ddu#start(#{sources: [#{name: "line"}]})<CR>
autocmd User Ddu:uiDone ++nested call ddu#ui#async_action('openFilterWindow')
autocmd User Ddu:uiDone echom 'Ddu:ui Event!'
How to reproduce the problem from neovim/Vim startup (Required!)
Start vim with vim -u min.vimrc -N min.vimrc or nvim -u min.vimrc min.vimrc
Press L to open ddu. Filter window automatically opened.
Press <Esc> to leave filter windows and q to quit ddu.
Press L again. Filter window does not appear.
:message shows only one line Ddu:ui Event!. Ddu:uiDone event triggered only once.
Problems summary
Following
:h ddu-ui-ff-fqq-25
, I set autocmd like bellow.First, calling
ddu#start()
work fine. Filter window is automatically opened. However quit the ddu window and then re-callddu#start()
, filter windows does not appeared. It seems thatDdu:uiDone
event was triggered only once.Expected
Ddu:uiDone
should triggered evey timeddu#start()
.Environment Information
ddu.vim version (SHA1): bec4b273b5a4ee133f15178ce07c68ceaace3e39
denops.vim version (SHA1): 09e64956c2946bba0a060d0a0aaddde106753bd9
deno version(
deno -V
output): deno 1.44.1OS: Arch Linux
neovim
:version
output:vim
:version
output:Provide a minimal init.vim/vimrc without plugin managers (Required!)
How to reproduce the problem from neovim/Vim startup (Required!)
vim -u min.vimrc -N min.vimrc
ornvim -u min.vimrc min.vimrc
L
to open ddu. Filter window automatically opened.<Esc>
to leave filter windows andq
to quit ddu.L
again. Filter window does not appear.:message
shows only one lineDdu:ui Event!
.Ddu:uiDone
event triggered only once.