Shougo / ddu-ui-filer

File listing UI for ddu.vim
MIT License
55 stars 8 forks source link

multi_actions(['expandItem', 'cursorNext']) seems not to execute in order. #38

Closed fuzakebito closed 4 months ago

fuzakebito commented 4 months ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

It is intended to sequentially perform directory expansion and cursor movement by using multi_actions(['expandItem', 'cursorNext']), aiming to position the cursor at the first item in the expanded directory. However, after this operation is performed, the cursor is found to be on the element next to the directory before its expansion, seems like cursor moved first and then the directory expanded afterwards.

Expected

The directory expands, and the cursor points to the next element of the expanded directory.

Environment Information

Provide a minimal init.vim/vimrc without plugin managers (Required!)

set runtimepath+=~/gomi/denops.vim
set runtimepath+=~/gomi/ddu.vim
set runtimepath+=~/gomi/ddu-ui-filer
set runtimepath+=~/gomi/ddu-source-file
nnoremap <silent> <Space>e <Cmd>call ddu#start(#{
      \   ui: 'filer',
      \   sources: [#{name:'file'}],
      \ })<CR>
nnoremap o <Cmd>call ddu#ui#multi_actions(['expandItem', 'cursorNext'])<CR>
nnoremap q <Cmd>call ddu#ui#do_action('quit')<CR>

How to reproduce the problem from neovim/Vim startup (Required!)

  1. \<space>e
  2. select some dir
  3. o

Screenshot (if possible)

Upload the log messages by :redir and :message (if errored)

Shougo commented 4 months ago

Reproduced.

Shougo commented 4 months ago

Fixed.