wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.81k stars 798 forks source link

Editing file mixed with Chinese and English in neovim in zellij will eliminate texts #3498

Open TD-Sky opened 1 year ago

TD-Sky commented 1 year ago

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

Awesome WM

WezTerm version

20230408-112425-69ae8472

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

The environment:

When I edit file mixed with Chinese and English, the popup menu of neovim will break the background. That is, after the popup menu fading away, scrolling in neovim eliminates some white space texts on the screen and these eliminated texts are in the line where Chinese locate.

The original problem occurred at editing rust code mixed with Chinese and English. Because the mechanism of neovim lsp, a mass of eliminated texts occurred above or below the Chinese line. But it is troublesome to reproduce a lsp environment in neovim, I decided to establish a more lightweight case as above with the same essence.

eliminated texts

The black blocks at the right of screen are where the texts eliminated. If wezterm is set to transparent, these position would be transparent as well.

How do I determine that the problem comes from wezterm? I test it in kitty and there were no problems.

To Reproduce

  1. Configure the neovim with tokyonight and nvim-notify.
  2. Prepare this text:
    
    Do not go gentle into that good night,
    Old age should burn and rave at close of day;
    Rage, rage against the dying of the light.

不要温和地走进那个良夜, 晚年应该在黄昏时燃烧狂怒; 愤怒,愤怒,不要让光芒消逝。

Though wise men at their end know dark is right, Because their words had forked no lightning they Do not go gentle into that good night.

尽管智者在临终时知道黑暗是正确的, 因为他们的话语并未分叉出闪电, 但他们也不会温和地走进那个良夜。

Good men, the last wave by, crying how bright Their frail deeds might have danced in a green bay, Rage, rage against the dying of the light.

好人,最后一波人潮,哭泣着,因为他们脆弱的行为本可能在绿色海湾中舞动, 愤怒,愤怒,不要让光芒消逝。

Wild men who caught and sang the sun in flight, And learn, too late, they grieved it on its way, Do not go gentle into that good night.

狂野的人们追逐并歌唱着太阳的飞行, 但他们也太晚了,因为他们在太阳逝去的路上感到悲伤, 所以他们不会温和地走进那个良夜。

Grave men, near death, who see with blinding sight Blind eyes could blaze like meteors and be gay, Rage, rage against the dying of the light.

临死的严肃的人们,以盲目的视野看到了死亡, 他们的盲目的眼睛也会像流星一样炽热而快乐, 愤怒,愤怒,不要让光芒消逝。

And you, my father, there on the sad height, Curse, bless me now with your fierce tears, I pray. Do not go gentle into that good night. Rage, rage against the dying of the light.

而你,我的父亲,在悲伤的高处, 我恳求你用你猛烈的眼泪诅咒和祝福我, 不要温和地走进那个良夜, 愤怒,愤怒,不要让光芒消逝。


3. Step `wezterm -> zellij -> neovim` to edit the text.
4. Type `:echo 1` in neovim to draw out a popup menu.
5. Scroll and you will see the texts are eliminated.

### Configuration

```lua
local wezterm = require("wezterm")

return {
    font = wezterm.font_with_fallback({
        "JetBrains Mono",
        "FiraCode Nerd Font",
        "Noto Sans CJK SC",
        "DejaVu Sans Mono",
        "Noto Sans Symbols2",
        "Noto Serif Grantha",
        "Noto Sans Gujarati UI",
    }),
    font_size = 16.5,
    color_scheme = "GruvboxDark",
    --window_background_opacity = 0.7,
    enable_tab_bar = false,
    line_height = 1.1,
    window_padding = {
        left = 0,
        right = 0,
        top = 0,
        bottom = 0,
    },
    default_cursor_style = "BlinkingBar",
    default_prog = { "/bin/zsh", "-l" },
    exit_behavior = "Close",
}

Expected Behavior

Described above.

Logs

There are no logs.

Anything else?

No response

wez commented 1 year ago

Please capture a terminal recording:

*** Finished recording to /var/tmp/wezterm-recording-sF6B3u.cast.txt

The file is an asciicast (compatible with https://asciinema.org/) and can also be replayed using wezterm replay.

The terminal recording allows me to replicate what is being sent to the terminal without requiring me to install the same applications as you and replicate your configuration for everything.

TD-Sky commented 1 year ago

No eliminated texts occurred in asciinema record. It seems that they cannot be recorded.

TD-Sky commented 1 year ago

No eliminated texts occurred in asciinema record. It seems that they cannot be recorded.

I found that only replaying the record in zellij can the eliminated texts be displayed.

Here is my record.

gukz commented 1 year ago

same issue.

andreyugolnik commented 10 months ago

Have the similar issue with mixed text - Hindi and English.