Shougo / ddu-ui-ff

Fuzzy finder UI for ddu.vim
MIT License
55 stars 26 forks source link

Cmdline integration is broken when calling `ddu#ui#get_items()` on CursorMoved #149

Closed 4513ECHO closed 4 months ago

4513ECHO commented 4 months ago

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

Problems summary

Cmdline integration is broken when calling ddu#ui#get_items() on CursorMoved.

Expected

Typed charactars should be appeared. Cmdline floatwin should not remained.

Environment Information

``` NVIM v0.11.0-dev-3568+g60734dc76-Homebrew Build type: Release LuaJIT 2.1.1720049189 Run ":verbose version" for more info ```

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

set runtimepath+=/path/to/vim-denops/denops.vim_v7-pre
set runtimepath+=/path/to/Shougo/ddu.vim
set runtimepath+=/path/to/Shougo/ddu-ui-ff
set runtimepath+=/path/to/Shougo/cmdline.vim
set runtimepath+=/path/to/4513ECHO/ddu-source-colorscheme

nnoremap mm <Cmd>call ddu#start(#{
      \ sources: [#{ name: 'colorscheme' }],
      \ kindOptions: #{
      \   colorscheme: #{ defaultAction: 'set' }
      \ },
      \ ui: 'ff',
      \ uiParams: #{
      \   ff: #{
      \     split: 'floating',
      \   },
      \ },
      \ })<CR>
cnoremap <CR> <CR><Cmd>call ddu#ui#do_action('itemAction')<CR>

autocmd User Ddu:uiDone call ddu#ui#async_action('openFilterWindow')
autocmd User Ddu:ui:ff:openFilterWindow call cmdline#enable()
autocmd CursorMoved ddu-ff-* call ddu#ui#get_items()

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

  1. Type mm
  2. Type something not appeared
  3. Cmdline floatwin is remained even you typed <CR>

Screenshot (if possible)

None.

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

None.

Shougo commented 4 months ago

It is reproduced. But it seems feature. You must not call UI action in autocmd.

Shougo commented 4 months ago

Because if you use it, cmdline.vim autocmd handlers are not called.

So

Cmdline floatwin is remained even you typed

This problem is occurred.

Answer:

Cmdline integration is broken when calling ddu#ui#get_items() on CursorMoved.

You must not do it.