Shougo / pum.vim

Original popup completion menu framework library
MIT License
110 stars 19 forks source link

`auto_select` option breaks pum's view updating #30

Closed ogaken-1 closed 2 years ago

ogaken-1 commented 2 years ago

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

Problems summary

When user set auto_select option to v:true, pum.vim stops updating its view.

Expected

Environment Information (Required!)

NVIM v0.9.0-dev-273+g451b8d6cb
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/sbin/cc -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/ogaken/repos/github.com/neovim/neovim/build/cmake.config -I/home/ogaken/repos/github.com/neovim/neovim/src -I/home/ogaken/repos/github.com/neovim/neovim/.deps/usr/include -I/usr/include -I/home/ogaken/repos/github.com/neovim/neovim/build/src/nvim/auto -I/home/ogaken/repos/github.com/neovim/neovim/build/include
Compiled by ogaken@ogaken

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

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

Run :checkhealth for more info

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

const s:packpath = expand('<sfile>:h') .. '/plugins/'
const s:optpackpath = s:packpath .. '/pack/foo/opt/'
if !isdirectory(s:optpackpath)
  call mkdir(s:optpackpath, 'p')
endif
exec printf('set packpath=%s', s:packpath)

function s:packadd(ghrepo)
  const l:installdir = s:optpackpath .. a:ghrepo
  if !isdirectory(l:installdir)
    call system(printf('git clone https://github.com/%s.git %s', a:ghrepo, l:installdir))
  endif
  exec printf('packadd %s', a:ghrepo)
endfunction

call s:packadd('vim-denops/denops.vim')
call s:packadd('Shougo/ddc.vim')
call s:packadd('Shougo/pum.vim')
call s:packadd('Shougo/ddc-ui-pum')
call s:packadd('Shougo/ddc-source-around')
call s:packadd('Shougo/ddc-matcher_head')

call ddc#custom#patch_global(#{
      \ ui: 'pum',
      \ sources: ['around'],
      \ sourceOptions: #{
      \   around: #{
      \     matchers: ['matcher_head'],
      \   }
      \ }})
call ddc#enable()

call pum#set_option('auto_select', v:true)

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

  1. Put follow init.vim to any directory.
  2. Run Neovim by $ nvim -Nu ./init.vim ./init.vim
  3. Input any text in insert-mode

Screen shot (if possible)

https://user-images.githubusercontent.com/60453380/202463140-9abb82eb-6dc5-4e20-9dc4-0369690f1166.mp4

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

No error message was output

Shougo commented 2 years ago

Reproduced.

ogaken-1 commented 2 years ago

It works in my environment. Thank you!