Shougo / ddu-ui-ff

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

`input()` does not work in custom action when `startFilter` is true. #123

Closed kamecha closed 1 year ago

kamecha commented 1 year ago

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

Problems summary

SSIA

Expected

input() work as well as startFilter is false.

Environment Information

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

set rtp+=~/.cache/dein/nvim/repos/github.com/vim-denops/denops.vim
set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu.vim
set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu-ui-ff
set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu-source-file
set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu-kind-file

function s:unko(args)
    let hoge = input('piyo: ')
    return 0
endfunction

call ddu#custom#action('kind', 'file', 'unko', function('s:unko'))

nnoremap [ddu] <Nop>
nmap <Space>u [ddu]
nmap <silent> [ddu]f <Cmd>call ddu#start({
            \ 'ui': 'ff',
            \ 'uiParams': { 'ff': { 'startFilter': v:true } },
            \ 'sources': [{'name': 'file', 'params': {}}],
            \ })<CR>

autocmd FileType ddu-ff call s:ddu_my_settings()

function! s:ddu_my_settings() abort
    nnoremap <buffer> u
                \ <ESC><Cmd>call ddu#ui#do_action('itemAction', {'name': 'unko'})<CR>
endfunction

autocmd FileType ddu-ff-filter call s:ddu_filter_my_settings()

function! s:ddu_filter_my_settings() abort
    inoremap <buffer> <C-l>
                \ <ESC><Cmd>call ddu#ui#ff#do_action('leaveFilterWindow')<CR>
endfunction

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

  1. type <Space> u f to start ddu
  2. type <C-l> to leave filter window
  3. type u to fire custom action
  4. input() doesn't seem to work

Screenshot (if possible)

startFilter is true startFilter

startFilter is false notStartFilter

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

Shougo commented 1 year ago

Fixed.