Shougo / ddu.vim

Dark deno-powered UI framework for Vim/NeoVim
MIT License
295 stars 24 forks source link

It is little inconvenient for not clearing input when action narrow #62

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

when the refreshItem action is fired, the input in filter window is not cleard.

Expected

When it is, the input is cleared.

Or the behavior can be setting.

Environment Information

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

" Your minimal init.vim/vimrc
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

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
    setlocal cursorline
endfunction

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

function! s:ddu_filter_my_settings() abort
    inoremap <buffer> <CR>
                \ <ESC><Cmd>call ddu#ui#do_action('itemAction', {'name': 'narrow'})<CR>
    inoremap <buffer> <C-n>
                \ <Cmd>call ddu#ui#do_action("cursorNext")<CR>
    inoremap <buffer> <C-p>
                \ <Cmd>call ddu#ui#do_action("cursorPrevious")<CR>
endfunction

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

neovim/Vim should be started with a path that has a directory under it.

  1. type <Space> u f for start ddu
  2. input any char ( this input by itself doesn't make much sense for not setting any matcher )
  3. select directory and type ''
  4. the items in UI is refreshed, but the input in filter window is remained...

Screenshot (if possible)

ddu-refresh

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

Shougo commented 1 year ago

Reproduced. But it is not easy to fix.

Shougo commented 1 year ago

Fixed.