Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird glitch in popup window #1370

Closed
5 tasks done
ckangnz opened this issue Feb 21, 2022 · 7 comments
Closed
5 tasks done

Weird glitch in popup window #1370

ckangnz opened this issue Feb 21, 2022 · 7 comments

Comments

@ckangnz
Copy link

ckangnz commented Feb 21, 2022

I always had this weird glitch when rendering the popup window on fzf, where the window spazzes whenever it opens. I thought it was due to too many files being loaded onto fzf finder.

But today i realised that there is a weird behaviour on my popup.

ezgif-1-30a8cc03ac

As shown in the screenshot, there are only 3 outcomes, but the popup still makes a weird glitch.
Then I realised that popup window on the right side had a broken UI.
When I toggle open the preview window, it is more evident.

image

I tried removing all other plugins and removed all of my settings except fzf, but couldn't remove this issue.

here is the minimum settings

".plugins
filetype off                  " required

call plug#begin('~/.vim/plugged')

Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'                                             " Fuzzy find files/content/tags
Plug 'neoclide/coc.nvim', {'branch': 'release', 'do': ':CocUpdate'}
"Plug 'antoinemadec/coc-fzf'                                         " Fzf for coc

call plug#end()

"-----------------------------------

".vimrc
"junegunn/fzf
set rtp+=~/.fzf
let $FZF_DEFAULT_OPTS="--layout=reverse --bind ctrl-k:preview-up,ctrl-j:preview-down,?:toggle-preview"
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 = []
let g:fzf_action = {
            \ 'ctrl-t': 'tab split',
            \ 'ctrl-o': 'split',
            \ 'ctrl-v': 'vsplit' }
command! Ctrlp execute (exists("*fugitive#head") && len(fugitive#head())) ? ':GFiles' : ':Files'
nnoremap <silent> <C-p> :Ctrlp<CR>
nnoremap <silent> <C-e> :History<CR>
nnoremap <silent> <C-t> :Tags<CR>
nnoremap <Leader>f :Rg<space>
vnoremap <Leader>f y:Rg <c-r>"<cr>
nnoremap <Leader>F :Rg <c-r><c-w><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

@junegunn
Copy link
Owner

What is the output of :echo &ambiwidth?

@ckangnz
Copy link
Author

ckangnz commented Feb 21, 2022

@junegunn single

@junegunn
Copy link
Owner

Is your terminal emulator capable of properly displaying box-drawing characters?

cat << EOF
╭─────────────────────────────────────────────────────╮
│                                                     │
│ https://en.wikipedia.org/wiki/Box-drawing_character │
│                                                     │
╰─────────────────────────────────────────────────────╯
EOF

@ckangnz
Copy link
Author

ckangnz commented Feb 22, 2022

@junegunn I've just tested on my terminal (iterm2) and it doesn't show broken side bar, but it still shows glitches.
It looks like the bar glitch is only present on macvim (v 8.2.3455 )

asdfsd

The gif shows vim first then mvim in comparison.

vim does not have the popup UI defect, but still has the glitch.
mvim has popup UI defect, and also has the glitch.

@ckangnz
Copy link
Author

ckangnz commented Feb 23, 2022

@junegunn should this be reported to macvim you reckon?

@junegunn
Copy link
Owner

I currently don't have macvim installed to confirm the case. You might want to open a terminal inside macvim (:terminal) and run the above command I showed you and see if it properly displays the box.

If it doesn't, I would try changing the font of macvim to see if it helps. Or you could add let $FZF_DEFAULT_OPTS='--no-unicode' to your Vim configuration file so that fzf doesn't use unicode box-drawing chars.

@ckangnz
Copy link
Author

ckangnz commented Feb 24, 2022

@junegunn thank you! i guess the issue was from my font?
Entering :terminal in macvim also showed the similar issues only on macvim terminal. I added --no-unicode and it fixed the issue.
Looks slightly uglier than before but looks more like vim style anyways :)

it hasn't solved the flickering issue, but the UI looks much better now.

Do you know what could be causing the flickering btw?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants