Shougo / denite.nvim

:dragon: Dark powered asynchronous unite all interfaces for Neovim/Vim8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Denite floating window causes unwanted reflow

oblitum opened this issue · comments

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

Problems summary

When opening denite window, the previous window can scroll and cause a surprising reflow that's very inconvenient and/or noisy.

Expected

Open floating window with less side effects. I have no issue with floaterm windows for example.

Environment Information (Required!)

  • denite version (SHA1): 48f485e

  • OS: ArchLinux

  • Vim/neovim version: NeoVim 0.4.4

  • :checkhealth or :CheckHealth result(neovim only):

health#denite#check
========================================================================
## denite.nvim
  - OK: has("python3") was successful
  - OK: Python 3.6.1+ was successful
  - OK: Require msgpack 1.0.0+ was successful

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $COLORTERM='truecolor'

## tmux
  - OK: escape-time: 0ms
  - INFO: $TERM: tmux-256color

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 2 provider (optional)
  - INFO: pyenv: Path: /home/francisco/.pyenv/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /home/francisco/.pyenv
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - ERROR: Python provider error:
    - ADVICE:
      - provider/pythonx: Could not load Python 2:
          /usr/bin/python2 does not have the "neovim" module. :help provider-python
          /usr/bin/python2.7 does not have the "neovim" module. :help provider-python
          python2.6 not found in search path or not executable.
          /home/francisco/.pyenv/shims/python is Python 3.8 and cannot provide Python 2.
  - INFO: Executable: Not found

## Python 3 provider (optional)
  - INFO: pyenv: Path: /home/francisco/.pyenv/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /home/francisco/.pyenv
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - WARNING: pyenv is not set up optimally.
    - ADVICE:
      - Create a virtualenv specifically for Neovim using pyenv, and set `g:python3_host_prog`.  This will avoid the need to install the pynvim module in each version/virtualenv.
  - INFO: Executable: /usr/bin/python3
  - INFO: Python version: 3.8.6
  - INFO: pynvim version: 0.4.2
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help g:ruby_host_prog for non-standard gem installations.

## Node.js provider (optional)
  - INFO: Node.js: v15.2.0
  - WARNING: Missing "neovim" npm (or yarn) package.
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim

Provide a minimal init.vim with less than 50 lines (Required!)

set runtimepath^=~/.vim/plugged/denite.nvim

colorscheme peachpuff
let mapleader = ' '
augroup vimrc | autocmd! | augroup end

function! s:denite_config() abort
  call denite#custom#option('default', {
  \   'prompt'      : '',
  \   'split'       : 'floating',
  \   'reversed'    : v:true,
  \   'start_filter': v:true,
  \   'statusline'  : v:false,
  \   'source_names': 'short'
  \ })
  call denite#custom#var('file/rec', 'command', ['rg', '--files', '--glob', '!.git', '--color', 'never'])
  call denite#custom#var('grep', {'command': ['rg'], 'default_opts': ['-i', '--vimgrep', '--no-heading'], 'recursive_opts': [], 'pattern_opt': ['--regexp'], 'separator': ['--'], 'final_opts': []})
endfunction

autocmd vimrc VimEnter * if exists('g:loaded_denite') | call s:denite_config() | endif

nnoremap <silent> <leader>dg :<c-u>Denite grep<cr>
nnoremap <silent> <leader>df :<c-u>Denite file<cr>

autocmd vimrc FileType denite nnoremap <silent><buffer><expr> <esc> denite#do_map('quit')
autocmd vimrc FileType denite-filter nnoremap <silent><buffer><expr> <esc> denite#do_map('quit')

How to reproduce problems from neovim startup (Required!)

  1. nvim -u ~/.mini.vim lengthy-file.txt
  2. Type 50% to go middle of file
  3. :Denite file

Screenshot (if possible)

gif-2020-11-14-175521

Reproduced.

Thanks, now it's very smooth :)