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

fzf's window has only half of the border in other encoding #2389

Closed
4 of 10 tasks
ofseed opened this issue Mar 12, 2021 · 4 comments
Closed
4 of 10 tasks

fzf's window has only half of the border in other encoding #2389

ofseed opened this issue Mar 12, 2021 · 4 comments
Labels

Comments

@ofseed
Copy link

ofseed commented Mar 12, 2021

  • I have read through the manual page (man fzf)
  • I have the latest version of fzf
  • I have searched through the existing issues

Info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Problem / Steps to reproduce

After Installed fzf, I found it's window has only a half the border like this. The screenshot is taken in nvim-qt, but the problem is same to fzf in console, the preview window also has only half of the border.
image
The reason might be my console is using GBK encoding. If I turn on the option 'Beta: Using UTF-8 provide global language support' in Windows, the window of fzf would display completely. But many of the programs in Windows is still using GBK encoding, including MSVC and JDK. If I change the encoding setting, they will output garbled characters.
It's very strange. Why half could display but the other half could not?

@junegunn
Copy link
Owner

junegunn commented Jan 3, 2023

#3111 might help which includes fix to gdamore/tcell#578.

This is a binary built from the latest source.

fzf-0.35.1-devel-windows_amd64.zip

@mzr1996
Copy link

mzr1996 commented Feb 3, 2023

#3111 might help which includes fix to gdamore/tcell#578.

This is a binary built from the latest source.

fzf-0.35.1-devel-windows_amd64.zip

I notice that fzf 0.35.1 doesn't have this problem, but fzf>=0.36.0 has this problem.
And the issue you mentioned helps. Adding let $RUNEWIDTH_EASTASIAN=0 in my vim config fixed it when fzf>=0.36.0.

@menghuu
Copy link

menghuu commented Apr 16, 2023

I have the same problem and after add RUNEWIDTH_EASTASIAN=0, it is fixed

the 0.39 version insalled by brew:
image

the 0.29 version installed by apt
image

some environment variables are:

> echo $FZF_DEFAULT_COMMAND
fd --hidden --follow --type f --exclude .git

> echo $FZF_DEFAULT_OPTS
--height 40% --layout=reverse --border

> echo $FZF_CTRL_T_COMMAND
fd --hidden --follow --exclude .git

> echo $FZF_ALT_C_COMMAND
fd --hidden --follow --exclude .git --type d

> echo $FZF_CTRL_T_OPTS



> /home/linuxbrew/.linuxbrew/bin/fzf --version
0.39.0 (brew)

> /bin/fzf --version
0.29 (devel)

I read the manpage, and test some case, actually --no-unicode or RUNEWIDTH_EASTASIAN=0(not 1 mentions in manpage) works but why 0.29 version works well, and 0.39 is breaking?

image

image

AND, with RUNEWIDTH_EASTASIAN=0 actually work (thanks #2389 (comment))
image

@junegunn
Copy link
Owner

@menghuu See 0c5956c.

I'll update the manual page to suggest 0 as well.
Unfortunately, there is no one-size-fits-all solution for this problem. 0.29 worked well for your environment but it didn't in some other environments.

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

No branches or pull requests

4 participants