junegunn / fzf.vim

fzf :heart: vim
MIT License
9.55k stars 583 forks source link

Popup crashes when you use `*` to highlight word under cursor #1409

Closed ckangnz closed 1 year ago

ckangnz commented 2 years ago

I actually can't replicate this issue with minimal configuration, and I can't figure out what my setting is causing this issue, but when I have a word highlighted using *, and try to open any fzf pop (Files/ Rg / Find reference etc.), it shows an invisible popup, which gets stuck. And I can't close the popup as well.

This is all I have configured for vim-fzf

set rtp+=~/.fzf
let $FZF_DEFAULT_OPTS="--layout=reverse --bind ctrl-k:preview-up,ctrl-j:preview-down"
let $FZF_DEFAULT_COMMAND='rg --files --follow --no-ignore-vcs --hidden -g "!{node_modules/*,.git/*}"'
let g:fzf_layout={'window':{ 'width': 0.9, 'height': 0.6 }}
let g:fzf_preview_window = ['right:60%:hidden','?']
let g:fzf_action = {
            \ 'ctrl-t': 'tab split',
            \ 'ctrl-o': 'split',
            \ 'ctrl-v': 'vsplit' }
command! Ctrlp execute len(FugitiveHead()) > 0 ? ':GFiles' : ':Files'
nnoremap <silent> <C-p> :Ctrlp<CR>
nnoremap <silent> <C-e> :History<CR>
nnoremap <Leader>f :Rg<space>
vnoremap <Leader>f y:Rg <c-r>"<cr>
nnoremap <Leader>F :Rg <c-r><c-w><cr>
nnoremap <Leader>@ :BCommits<cr>

autocmd! FileType fzf
autocmd! FileType fzf tnoremap <buffer> <esc> <c-c>
autocmd  FileType fzf set laststatus=0 noshowmode noruler
  \| autocmd BufLeave <buffer> set laststatus=2 showmode ruler

When I try to :Files when this happens, i get this warning below:

image

This is how it looks like (invisible popup)

image
ckangnz commented 1 year ago

This issue is gone from the latest update. Also I found it was colliding with vim-searchhi plugin, which is no longer needed by vim's default CurSearch highlight group. After removing vim-searchhi, it works fine now :)