Shougo / ddu-ui-ff

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

Option 'previewwindow' in the ddu-ff preview-window is not set #53

Closed hereGittyGitty closed 2 years ago

hereGittyGitty commented 2 years ago

Hi Shougo.

Thx a lot for the ddu series of plugins of course. (And a late 'thx-a-lot' for the denite.nvim, unite.vim... plugins as well). Still can't figure out what your avatar on github is meant to be (its not a zebra-dragon is it? šŸ˜‰)

Problems summary

When invoking the preview action on a file kind/source the emerging preview window has its previewwindow option set to nopreviewwindow. As of now there is only on big problem I have with this fact. I really like to use the vim-preview plugin to scroll the preview window while leaving the cursor in the denite-window and I am missing this functionality in ddu.

Expected

I would expect the ddu-ff preview window to have its previewwindow option set to previewwindow

Environment Information

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

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info


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

```vim
" Your minimal init.vim/vimrc
set nocompatible

set runtimepath+=/usr/local/src/neovim_minimal_stuff/denops.vim
set runtimepath+=/usr/local/src/neovim_minimal_stuff/ddu.vim
set runtimepath+=/usr/local/src/neovim_minimal_stuff/ddu-source-file
set runtimepath+=/usr/local/src/neovim_minimal_stuff/ddu-kind-file
set runtimepath+=/usr/local/src/neovim_minimal_stuff/ddu-ui-ff
set runtimepath+=/usr/local/src/neovim_minimal_stuff/ddu-commands.vim
set runtimepath+=/usr/local/src/neovim_minimal_stuff/vim-preview

filetype plugin indent on

" ddu#custom#patch_global ui: ff --- {{{
call ddu#custom#patch_global({
    \ 'ui': 'ff',
    \ })
" }}}

" ddu_ff_my_settings --- {{{
autocmd FileType ddu-ff call s:ddu_ff_my_settings()
function! s:ddu_ff_my_settings() abort
  nnoremap <buffer><silent> p
        \ <Cmd>call ddu#ui#ff#do_action('preview')<CR>
endfunction
" }}}

" vim-preview --- {{{
noremap <silent> <A-k> :PreviewScroll -1<cr>
noremap <silent> <A-j> :PreviewScroll +1<cr>
inoremap <silent> <A-k> <c-\><c-o>:PreviewScroll -1<cr>
inoremap <silent> <A-j> <c-\><c-o>:PreviewScroll +1<cr>
" }}}

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

  1. start a minimal neovim with the command: VIMRUNTIME=/usr/local/src/neovim/runtime /usr/local/src/neovim/build/bin/nvim --clean -u /usr/local/src/neovim_minimal_stuff/minimal_init.vim
  2. execute Ddu file
  3. move the cursor to a file entry
  4. press the the p-key (mapping for the preview action) to open the preview window
  5. execute the command wincmd k to focus the preview window
  6. query the 'previewwindow'-option by executing the command set previewwindow?

Screenshot (if possible)

ddu-ui-ff-nopreviewwindow

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

Further remarks:

If this is by design, would it be possible to add the feature of scrolling the preview window while keeping the cursor-focus on the ddu-ff window?

Thx a lot and have a good one ^^

Shougo commented 2 years ago

Fixed.

Thx a lot for the ddu series of plugins of course. (And a late 'thx-a-lot' for the denite.nvim, unite.vim... plugins as well). Still can't figure out what your avatar on github is meant to be (its not a zebra-dragon is it? wink)

The icon is the dragon knight head instead of zebra.

hereGittyGitty commented 2 years ago

Fixed.

Nice... thank you :)

The icon is the dragon knight head instead of zebra.

Got it...