Shougo / ddu-ui-ff

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

after fireing action with chooseAction, the mode is INSERT not NORMAL #121

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

after firering action with chooseAction, the mode is NORMAL.

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-source-action
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'},
            \ ],
            \ 'kindOptions': {
            \   'action': {
            \       'defaultAction': 'do'
            \   }
            \ },
            \ })<CR>

autocmd FileType ddu-ff call s:ddu_my_settings()

function! s:ddu_my_settings() abort
    nnoremap <buffer> <CR>
                \ <Cmd>call ddu#ui#do_action('itemAction')<CR>
    nnoremap <buffer> a
                \ <Cmd>call ddu#ui#do_action('chooseAction')<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> in filter window to leave filter window.
  3. type a in ddu window for fire chooseAction
  4. type <CR> in ddu window with action source ( for example 'open' action )
  5. after open action, the mode is INSERT...

Screenshot (if possible)

hoge

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

Shougo commented 1 year ago

Fixed. Please update ddu-source-action.