junegunn / junegunn/fzf.vim

issue on rendering (clearning) Chinese characters when switching files on Win-10

Open
#1,377 13 comments 2 reactions 0 assignees View on GitHub
windows
Dominant language
Vim Script
Stars
10.3k
Forks
608
Avg merge
5d 8h
Merged PRs (30d)
2

Description

- [x] I have fzf 0.23.0 or above
- [x] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
- [x] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
- [x] I have read through the manual page of fzf (`man fzf`)
- [x] I have searched through the existing issues

Hi please see the issue in GIF. Essentially when running `:Rg` command or `:Files` command (and others), switching from files that contains Chinese characters causes rendering issue that does not clear the Chinese characters from the screen.

![chinese display](https://user-images.githubusercontent.com/34254408/159163274-dbe866cd-28b0-4d23-8247-e9b69851739c.gif)

PS: I've tested on my 2 PCs running Win10Pro and Win10Home, both set CHCP = 65001 and vim, CMD, Powershell, Bash all set the font that supports Chinese. Plz let me know if anything else I could try. Thanks much in advance!

PS2: below is my fzf config, pretty standard I assume.

```vim
"fzf config
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.9 } }
let $FZF_DEFAULT_OPTS="--ansi --preview-window 'right:60%' --margin=1,4"
let $PATH = "C:\\Program Files\\Git\\usr\\bin;" . $PATH
"!! note: fd need to be installed separated before using in fd
"ignored file search is configured @ c:\Users\xxx\AppData\Roaming\fd\ignore
let $FZF_DEFAULT_COMMAND = 'fd --type f --color always'
command! -bang -nargs=* Rg
\ call fzf#vim#grep(
\ 'rg --column --line-number --no-heading --color=always --smart-case -- '.shellescape(), 1,
\ fzf#vim#with_preview(), 0)
nnoremap / :Rg

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.