ultisnips icon indicating copy to clipboard operation
ultisnips copied to clipboard

Multiple match dialog shown for same snippet

Open Silur opened this issue 1 year ago • 0 comments

Opening a new buffer /tmp/test.jsx (or any other file type) and trying a snippet from vim-snippets shows the "multiple matches" selection dialog, even though it shows that both options are in fact coming from the same file, from the same line:

# vim /tmp/test.jsx

rfc<tab>

1: (rfc) "react functional component" (/home/silur/.vim/pack/vendor/start/vim-snippets/UltiSnips/javascript_react.snippets:10)
2: (rfc) "react functional component" (/home/silur/.vim/pack/vendor/start/vim-snippets/UltiSnips/javascript_react.snippets:10)
Type number and <Enter> or click with the mouse (q or empty cancels): 

Selecting either option will complete the snippet as usual.

Asciinema demonstration: https://asciinema.org/a/6lyePLGN28jhYlI1f5kzqlXJo

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jan 12 2023 11:41:18)
Included patches: 1-1182
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       +tcl/dyn
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl/dyn          +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3/dyn       +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby/dyn          +wildignore
+cursorbind        +lua/dyn           +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        +mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
-farsi             -mouse_sysmouse    -tag_old_static
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/vim/src=/usr/src/debug/vim -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -L/usr/local/lib -o vim -lm -ltinfo -lelf -lacl -lattr -lgpm -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -fstack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/5.36/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm

output of :scriptnames

:scriptnames
  1: /etc/vimrc
  2: /usr/share/vim/vimfiles/archlinux.vim
  3: ~/.vimrc
  4: /usr/share/vim/vim90/filetype.vim
  5: ~/.vim/ftdetect/solidity.vim
  6: ~/.vim/ftdetect/vue.vim
  7: /usr/share/vim/vimfiles/ftdetect/task.vim
  8: /usr/share/vim/vim90/ftplugin.vim
  9: /usr/share/vim/vim90/indent.vim
 10: /usr/share/vim/vim90/syntax/syntax.vim
 11: /usr/share/vim/vim90/syntax/synload.vim
 12: /usr/share/vim/vim90/syntax/syncolor.vim
 13: /usr/share/vim/vim90/colors/lists/default.vim
 14: /usr/share/vim/vim90/indent/html.vim
 15: /usr/share/vim/vim90/indent/javascript.vim
 16: ~/.vim/plugin/emmet.vim
 17: /usr/share/vim/vimfiles/plugin/redact_pass.vim
 18: /usr/share/vim/vim90/plugin/getscriptPlugin.vim
 19: /usr/share/vim/vim90/plugin/gzip.vim
 20: /usr/share/vim/vim90/plugin/logiPat.vim
 21: /usr/share/vim/vim90/plugin/manpager.vim
 22: /usr/share/vim/vim90/plugin/matchparen.vim
 23: /usr/share/vim/vim90/plugin/netrwPlugin.vim
 24: /usr/share/vim/vim90/plugin/rrhelper.vim
 25: /usr/share/vim/vim90/plugin/spellfile.vim
 26: /usr/share/vim/vim90/plugin/tarPlugin.vim
 27: /usr/share/vim/vim90/plugin/tohtml.vim
 28: /usr/share/vim/vim90/plugin/vimballPlugin.vim
 29: /usr/share/vim/vim90/plugin/zipPlugin.vim
 30: ~/.vim/pack/vendor/start/YouCompleteMe/plugin/youcompleteme.vim
 31: ~/.vim/pack/vendor/start/ultisnips/plugin/UltiSnips.vim
 32: ~/.vim/pack/vendor/start/ultisnips/autoload/UltiSnips/map_keys.vim
 33: ~/.vim/pack/vendor/start/ultisnips/ftdetect/snippets.vim
 34: ~/.vim/pack/vendor/start/vim-snippets/plugin/vimsnippets.vim
 35: ~/.vim/pack/vendor/start/ultisnips/after/plugin/UltiSnips_after.vim
 36: ~/.vim/pack/vendor/start/YouCompleteMe/autoload/youcompleteme.vim
 37: ~/.vim/pack/vendor/start/YouCompleteMe/autoload/youcompleteme/filetypes.vim

Silur avatar Feb 04 '23 22:02 Silur