Shougo / ddu-ui-ff

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

Cannot open filter window properly #62

Closed hyuoou closed 1 year ago

hyuoou commented 1 year ago

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

Problems summary

When using autoAction, startFilter and split float, the filter window may not open properly.

Expected

Open the filter window normally.

Environment Information

Features: +acl +tui See ":help feature-compile"

  システム vimrc: "$VIM/sysinit.vim"
   省略時の $VIM: "/usr/share/nvim"

Run :checkhealth for more info


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

```vim
set runtimepath^=~/plugins/denops.vim
set runtimepath^=~/plugins/ddu.vim
set runtimepath^=~/plugins/ddu-ui-ff
set runtimepath^=~/plugins/ddu-source-file_rec
set runtimepath^=~/plugins/ddu-filter-matcher_substring
set runtimepath^=~/plugins/ddu-kind-file
set runtimepath^=~/plugins/tokyonight.nvim

colorscheme tokyonight

call ddu#custom#patch_global({
  \ 'ui': 'ff',
  \ 'sources': [{'name': 'file_rec', 'params': {}}],
  \ 'uiParams': {
  \   'ff': {
  \     'split': 'floating',
  \     'startFilter': v:true,
  \     'autoAction': {'name': 'preview'},
  \   },
  \ },
  \ 'sourceOptions': {
  \   '_': {
  \     'matchers': ['matcher_substring'],
  \   },
  \ },
  \ 'kindOptions': {
  \   'file': {
  \     'defaultAction': 'open',
  \   },
  \ }
  \ })

autocmd FileType ddu-ff call s:ddu_my_settings()
function! s:ddu_my_settings() abort
  nnoremap <buffer><silent> <CR> <Cmd>call ddu#ui#ff#do_action('itemAction')<CR>
  nnoremap <buffer><silent> i <Cmd>call ddu#ui#ff#do_action('openFilterWindow')<CR>
  nnoremap <buffer><silent> q <Cmd>call ddu#ui#ff#do_action('quit')<CR>
endfunction

autocmd FileType ddu-ff-filter call s:ddu_filter_my_settings()
function! s:ddu_filter_my_settings() abort
  inoremap <buffer><silent> <CR> <Esc><Cmd>call ddu#ui#ff#close()<CR>
endfunction

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

  1. Execute call ddu#start({})
  2. Close ddu.vim
  3. Execute call ddu#start({}) again

Screenshot (if possible)

https://user-images.githubusercontent.com/63180765/217485192-2ade51f0-413d-46d4-93ec-494a4b9eee3d.mp4

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

Shougo commented 1 year ago

Reproduced.

Shougo commented 1 year ago

Fixed.