vim-fuzzbox/fuzzbox.vim

:FuzzyFiles crashes on Windows.

Closed this issue · 7 comments

The mentioned command causes Vim to quit on Windows.

To reproduce, try to run Vim with the following .vimrc (OBS! No fd installed!):

vim9script

if has("win64") || has("win32") || has("win16")
  g:os = "Windows"
else
  g:os = substitute(system('uname'), '\n', '', '')
endif

if g:os == "Windows" || g:os =~ "^MINGW64"
  g:dotvim = $HOME .. "\\vimfiles"
  # source $VIMRUNTIME/mswin.vim
  # For mingw64
  set runtimepath+=C:/Users/yt75534/vimfiles
else
  g:dotvim = $HOME .. "/.vim"
endif

set scrolloff=8
set encoding=utf-8
set langmenu=en_US.UTF-8
# set langmap=ö[,ä]
set belloff=all
set clipboard^=unnamed,unnamedplus
set termguicolors
set autoread
set number
set nowrap
set tabstop=2 softtabstop=2
set shiftwidth=2
set expandtab
set smartindent
set nobackup
set backspace=indent,eol,start
set nocompatible              # required
set splitright
set splitbelow
set incsearch # for displaying while searching
set smartcase
set hidden
set noswapfile
set spell spelllang=en_us
set nofoldenable
set foldmethod=syntax
set foldlevelstart=20
set wildmenu wildoptions=pum
set completeopt-=preview
set textwidth=78
set iskeyword+="-"
set formatoptions+=w,n,p
set diffopt+=vertical
set wildcharm=<tab>
set conceallevel=2
set concealcursor=nvc
# TODO adjust path option. Move to after/ftplugin

plug#begin(g:dotvim .. "/plugins/")
Plug 'junegunn/vim-plug' # For getting the help, :h plug-options
Plug 'Donaldttt/fuzzyy'
plug#end()
# filetype plugin indent on
syntax on"

# fuzzyy setup
g:enable_fuzzyy_keymaps = false
g:fuzzyy_dropdown = true
g:fuzzyy_menu_matched_hl = 'WarningMsg'
nnoremap <c-p> <cmd>FuzzyFiles<cr>
nnoremap <c-p>w <cmd>FuzzyInBuffer<cr>
nnoremap <c-p>b <cmd>FuzzyBuffer<cr>
nnoremap <c-p>o <cmd>FuzzyMRUFiles<cr>
tnoremap <c-p>g <cmd>FuzzyGrep<cr>

g:fuzzyy_window_layout = {
  FuzzyFiles: { preview: false },
  FuzzyMRUFiles: { preview: false }
}

I am using the following:

**"VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Aug 14 2024 22:13:31)
MS-Windows 64-bit GUI/console version med OLE-stöd
Inkluderade patchar: 1-675
Kompilerad av appveyor@APPVEYOR-VM
Enorm version med GUI.  Funktioner inkluderade (+) eller inte (-):
+acl                +cmdline_compl      -ebcdic             +insert_expand      +mksession          +popupwin           +sound              +textprop           +vtp
+arabic             +cmdline_hist       +emacs_tags         +ipv6               +modify_fname       -postscript         +spell              -tgetent            +wildignore
+autocmd            +cmdline_info       +eval               +job                +mouse              +printer            +startuptime        +timers             +wildmenu
+autochdir          +comments           +ex_extra           +jumplist           +mouseshape         +profile            +statusline         +title              +windows
+autoservername     +conceal            +extra_search       +keymap             +multi_byte_ime/dyn +python/dyn         -sun_workshop       +toolbar            +writebackup
+balloon_eval       +cryptv             -farsi              +lambda             +multi_lang         +python3/dyn-stable +syntax             +user_commands      -xattr
+balloon_eval_term  +cscope             +file_in_path       +langmap            +mzscheme/dyn       +quickfix           +tag_binary         +vartabs            -xfontset
+browse             +cursorbind         +find_in_path       +libcall            +netbeans_intg      +reltime            -tag_old_static     +vertsplit          -xim
++builtin_terms     +cursorshape        +float              +linebreak          +num64              +rightleft          -tag_any_white      +vim9script         +xpm_w32
+byte_offset        +dialog_con_gui     +folding            +lispindent         +ole                +ruby/dyn           -tcl                +viminfo            -xterm_save
+channel            +diff               -footer             +listcmds           +packages           +scrollbind         +termguicolors      +virtualedit        
+cindent            +digraphs           +gettext/dyn        +localmap           +path_extra         +signs              +terminal           +visual             
+clientserver       +directx            -hangul_input       +lua/dyn            +perl/dyn           +smartindent        -termresponse       +visualextra        
+clipboard          -dnd                +iconv/dyn          +menu               +persistent_undo    +sodium/dyn         +textobjects        +vreplace           
   system-vimrc-fil: "$VIM\vimrc"
     användar-vimrc-fil: "$HOME\_vimrc"
 Andra användar-vimrc-fil: "$HOME\vimfiles\vimrc"
 Tredje användar-vimrc-fil: "$VIM\_vimrc"
      användar-exrc-fil: "$HOME\_exrc"
  Andra användar-exrc-fil: "$VIM\_exrc"
  system-gvimrc-fil: "$VIM\gvimrc"
    användar-gvimrc-fil: "$HOME\_gvimrc"
Andra användar-gvimrc-fil: "$HOME\vimfiles\gvimrc"
Tredje användar-gvimrc-fil: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
    systemmenyfil: "$VIMRUNTIME\menu.vim"
Kompilering: cl -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DHAVE_STDINT_H  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32 -DHAVE_SODIUM -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"libsodium.dll\" /I "C:\projects\vim-win32-installer\dependencies\libsodium\include" -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 /source-charset:utf-8 /MP /Ox /GL -DNDEBUG /Zl /MT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DVIMDLL -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python3.dll\" -DDYNAMIC_PYTHON3_STABLE_ABI -DFEAT_MZSCHEME -I "C:\projects\vim-win32-installer\dependencies\racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_dcgt6o.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_dcgt6o.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl532.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-ucrt-ruby320.dll\" -DRUBY_VERSION=32 -DFEAT_HUGE /Fd.\ObjDXOULYHRZAMD64/ /Zi
Länkning: link /nologo /opt:ref /LTCG /HIGHENTROPYVA:NO oldnames.lib 
kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib 
netapi32.lib uuid.lib user32.lib  /machine:AMD64 version.lib  winspool.lib 
comctl32.lib libcmt.lib oleaut32.lib  /nodefaultlib:lua54.lib  /STACK:8388608  
/nodefaultlib:python27.lib  /nodefaultlib:python3.lib   winmm.lib  Ws2_32.lib 
xpm\x64\lib-vc14\libXpm.lib  /PDB:vim64.pdb -debug"
**

EDIT: in Vim, it messes up terminal and popup, see screenshot below:

image

Hi is there any error message? I could not reproduce with your config with the same vim version.

No error messages. But I have noticed that it randomly crashes. Have you tried to type something in the search box after started :FuzzyFiles?

You can try with both Vim and GVim.

Yes I tried input many things include typing, but I still could not reproduce this bug. Could you provide more info such as what windows version, what terminal are you using? Do you think you can provide a screen recording of the bug?

I am using Windows terminal, Windows 10 OS Build: 19045.4046

Here is a short video using Vim; https://streamable.com/s7y7sa
Using gvim just closes the app.
What you see at the beginning is :FuzzyMRU that is run at VimEnter event. I also tried to remove such an event but it didn't help.

I still couldnot reproduce it. Is it possible it is related to this bug from vim #31 Though there isn't any error message?

Mmmm, it could be. I will try to install a more recent version of Vim and I will let you know later on today.

Just noticed that this bug was addressed very recently, so it could be.

Good news. Tested with the latest nightly build (v9.1.0695) and the problem seem to have disappeared! :)